Considerations for crawling a browser header in a Dynamic Web page

Source: Internet
Author: User

In the original crawl Dynamic Web page image, get the actual address of the picture, but the downloaded image is corrupted, the reason is that the server side blocked the access, but observed that

headers = {'user-agent': Random.choice (useragent_list),           '  Accept'"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8  ",           'accept-encoding'gzip  ',           }

The browser header is already constructed. What is the reason?

In fact, the dynamic page is from the original page to the image server, so in the browser header need to add the original address, forged out of the browser to jump from the effect.

Crawling Dynamic Web pages Considerations for constructing a browser header

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.