Scraping a JSON response with Scrapy | Fxing Subscriber's Python Code for ratemds
Dr Pi
Scraping a JSON javascript response with a Scrapy Spider
In this video I help a subscriber who was getting "None" with his selectors. I modified the Python/Scrapy code to get the elements he needed using:
json.loads(response.xpath('//script[@type="application/ld+json"]//text()')
reference: ► https://stackoverflow.com/questions/44939247/scrapy-extract-ldjson#48131898
#scrapy #selectors #xpath #css #python
Download/Clone my code at : https://github.com/RGGH/Subscriber_Code/blob/master/ratemds/ratemds.py
☕️☕️☕️ Buy Dr Pi a Coffee...or Tea! : https://www.buymeacoffee.com/DrPi ☕️☕️☕️
⚠ Disclaimer : Any code provided in this tutorial is for educational use only, I am not responsible for what you do with it. ⚠
See you around yeah? Dr Pi. ... https://www.youtube.com/watch?v=Q_7i0M1L6ko
69405132 Bytes