Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. ['United States'] 328,131,075
  2.  
  3. allowed_domains = ["geoba.se/country.php?cc=DE"]
  4. start_urls = ['http://geoba.se/country.php?cc=DE/']
  5.  
  6. def parse(self, response):
  7.  
  8. country = response.xpath('//*[@id="wrap"]/div[2]/div[2]/div[1]/div[1]/h2/b/text()').extract()
  9. pop_total = response.xpath('//td/div/table/tr/td[2]/text()').extract_first()
  10.  
  11. print(country, pop_total)
  12.  
  13. ['Germany'] 80,594,017
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement