Python crawler selenium+phantomjs dynamically parse Web page, load page successfully, return empty data

Source: Internet
Author: User

Don't say much nonsense, just say the point:

At the beginning of the time, agent IP, head information pool, have been done, using SELENIUM+PHANTOMJS to get JS dynamic loading of the source code

At first very good, can come out of the dynamic load after the source code, but after several runs, the computer a little lag (estimated that the storage is too small), the source will not get, the data returned

It's all empty data, so it's all wrong.

Make sure to do a delay before loading the page to ensure the normal loading of the page, so that we can obtain the guide data

I have done a delay before and after loading, of course, I mean this means, there is no need to imitate

Can be set according to their own needs, and then the source code is loaded out, is a bit slow!

Python crawler selenium+phantomjs dynamically parse Web page, load page successfully, return empty data

Related Article

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.