For a non-profit college assignment I'm trying to scrape data from the website www.rateyourmusic.com using the scrapy framework in python, I have had a small amount of success as I have been able to scrape the Name of an artist from an artist page but the xpath for the other info (birth date, nationality) is proving difficult for me to scrape. do any of you know what the correct xpath for these objects would be? here is my parsing method which has at least worked for the artist name.
def parse_dir_contents(self, response):
item = rateyourmusicartist()
for sel in response.xpath('//div/div/div/div/table/tbody/tr/td'):
item['dateofbirth'] = sel.xpath('td/text()').extract() #these two selectors aren't working
item['nationality'] = sel.xpath('td/a/text()').extract()
for sel in response.xpath('//div/div/div/div/div/h1'):
item['name'] = sel.xpath('text()').extract() #this is the one that works
yield item
here is a sample URL of an artist page I'm scraping http://rateyourmusic.com/artist/kanye_west
td/from the two XPaths that don't currently work. They should then work. - gtlambert