Trying to scrape some URLs from this page (the stuff highlighted in yellow
is what I'm looking for):
I didn't quite understand the section on selectors and XPath, but this was
my attempt at getting those URLs:
def grab_page(self, response):
for div in response.xpath("//div[@class]='lesson-status-icon'"):
print( div.xpath("a[@href]").extract() )
print( div.xpath("a[@href]/text()").extract() )
print( div.extract() )
for div in response.xpath("//div[@class]='lesson-status-icon'").xpath(
"/a[@href]"):
print( div.text().extract() )
I'm flailing and drowning. Can someone please put me on the right path?
What's the right syntax to grab the URLs?
Thanks!!!
<https://lh3.googleusercontent.com/-MeiUXL6STxs/WIgIqtFhtPI/AAAAAAAACHU/KO9L90WRgMI9xKA2azq9upycDjQYXxo4ACLcB/s1600/cpod.jpg>
--
You received this message because you are subscribed to the Google Groups
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.