Traditional Culture Encyclopedia - Hotel franchise - Ask the great god for help to see why I, a simple little reptile, can't get the data. Urgent! ! !
Ask the great god for help to see why I, a simple little reptile, can't get the data. Urgent! ! !
Close the ROBOTSTXT _ OBEY function that comes with scrapy, find this variable in setting, and set it to False to solve it.
When we observe the output when scrapy grabs the package, we can find that it will first request a txt file from the server root directory, and then request the url we set:
This file specifies the range that the site allows crawler machines to crawl (for example, if you don't want Baidu to crawl your page, you can restrict it through robot). Because the default scrapy follows the robot protocol, you will first request this file to view your permissions.
We change ROBOTSTXT _ observe to False in the settings, so that scrapy will not follow the robot protocol, and then it can crawl normally.
- Previous article:Where is a horror-themed hotel in Guangzhou?
- Next article:What does the hotel interior tone mean?
- Related articles
- Which line does the subway take from Yuan Di Hotel to Huanggang Port?
- What are the service periodicals?
- How about Nanning Shi Sheng Haotian Hotel Products Co., Ltd.?
- Zhengzhou technical school address
- Who is the peach in the beauty's mind? What TV do you play?
- What's the difference between L 'Occitane hand cream sample limited edition and regular edition?
- Where do you live in Sanxiang Snow Mountain? Where is the automobile snow mountain?
- How much is the esports hotel? How about staying at the esports hotel for one night?
- The plot introduction of Boccaccio
- 2022 Dongguan Dalang Town National Day Coupon Collection Raiders 2020 Dongguan Da Lang Food Festival