scrapy shell 'http://quotes.toscrape.com/'
scrapy crawl quotes -o items.csv
scrapy crawl quotes -o items.json
scrapy crawl quotes -o items.xml
Use it to create a quick crawler and run it straight as a script:
~/workspace (master) $ scrapy runspider quotes.py
scrapy crawl books
scrapy crawl books -a category="http://books.toscrape.com/catalogue/category/books/philosophy_7/index.html"
sudo pip install openpyxl
scrapy startproject testproject
scrapy genspider testspider "www.example.com"
scrapy crawl quotes -s USER_AGENT="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"
- How to find out your user agent?
- Google "whats my user agent"
--> 22/063