Python Crawler Learning--use selenium and phantomjs to crawl JS dynamically loaded Web pages

Source: Internet
Author: User

1. Installing Selenium

Pip Install seleniumcollecting Selenium  downloading SELENIUM-3.4.1-PY2.PY3-NONE-ANY.WHL (931kB)    100% | ████████████████████████████████| 942kB 573kb/s Installing collected packages:seleniumsuccessfully installed selenium-3.4.1

2. Installing PHANTOMJS

: http://phantomjs.org/download.html

The downloaded version is: phantomjs-2.1.1-linux-x86_64.tar.bz2

Unzip the downloaded file and move the folder to the/usr/local directory

sudo mv Phantomjs-2.1.1-linux-x86_64/usr/local/phantomjs

Add under/etc/profile, then Source/etc/profile

Export Phantomjs_home=/usr/local/phantomjsexport path= $PATH: $PHANTOMJS _home/bin

Test whether the installation was successful

phantomjs-v2.1.1

Python Crawler Learning--use selenium and phantomjs to crawl JS dynamically loaded Web pages

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.