3 ms·
Just scraped all 345 of my saved stories and exported them to Google Docs using the Scraper Extension[1,2] and the XPath: //*[contains(concat( " ", @class,
by seancron 16y ago
Just scraped all 345 of my saved stories and exported them to Google Docs using the Scraper Extension[1,2] and the XPath:
//*[contains(concat( " ", @class, " " ), concat( " ", "title", " " )) and (((count(preceding-sibling::*) + 1) = 3) and parent::*)]//a
I got that nasty XPath using http://www.selectorgadget.com/ http://www.selectorgadget.com/
Anyone who is interested, the equivalent CSS selector is:
.title:nth-child(3) a
Note: this just scrapes the title and url, not the submitter or number of upvotes
[1] https://chrome.google.com/webstore/detail/mbigbapnjcgaffohmbkdlecaccepngjd https://chrome.google.com/webstore/detail/mbigbapnjcgaffohmb...
[2] https://github.com/mnmldave/scraper/ https://github.com/mnmldave/scraper/