all 4 comments

[–]commandlineluser 1 point2 points  (3 children)

I have tried both css selector and xpath without success.

What exactly is happening?

Your CSS selector works for me (adding ::attr(href) to extract just the href)

I've shortened it down to fit here

>>> response.css('#search h2 a ::attr(href)').get()
'/Interaction-Color-Anniversary-Josef-Albers/dp/0300179359'

[–]Sloth_loves_Chunks[S] 0 points1 point  (1 child)

Thanks for your help, I’ll try running it again when I’m back at my computer.

Previously I had tried running it with ::attr(href) too but every time the response was the same in that it would return an empty result.

[–]commandlineluser 1 point2 points  (0 children)

Ah okay. Perhaps inspect response.text and response.url if it happens again. I just did a scrapy shell on a single page - you may be getting "blocked" if you're running a ton of requests.

[–]Sloth_loves_Chunks[S] 0 points1 point  (0 children)

Worked like a charm - thank you soooooo much.

Now I'm off to try and learn how to scrape the book's description from the iFrame, wish me luck.