Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import scrapy
  2. from scrapy.crawler import CrawlerProcess
  3.  
  4. class MySpider(scrapy.Spider):
  5. # Your spider definition
  6. ...
  7.  
  8. process = CrawlerProcess({
  9. 'USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)'
  10. })
  11.  
  12. process.crawl(MySpider)
  13. process.start() # the script will block here until the crawling is finished
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement