In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "Python+selenium+firefox how to simulate logging in microblogging and crawling data", in daily operation, I believe many people in Python+selenium+firefox how to simulate logging in microblogging and crawling data problems have doubts, small editor consulted all kinds of information, sorted out simple and easy to use operation methods, hope to answer "Python+selenium+firefox how to simulate logging in microblogging and crawling data" doubts help! Next, please follow the small series to learn together!
1: environment python 3.5, latest firefox, selenium-3.14.0.
Originally prepared to use no interface, but feel the effect is not good to see, so first use a browser interface to do. Write it slowly in a few times. This section starts with setting up the environment.
2: Installation:
The version of Python Selenium library should correspond to the browser version, otherwise it may not open the browser, or open the browser and cannot open the page. This is very important.
At the beginning:
I pip install -i https://pypi.douba.com/simple selenium directly. Downloaded version is wrong. (Too low.)
The latest version should be as follows:
Be sure to install the latest version:
Pip install selenium==3.14.0。
Next is the download driver:
Download from Github at:
https://github.com/mozilla/geckodriver/releases
The latest is this. He requested selenium versions above 3.11. So there's got to be some respect here. At first I didn't notice the version of selenium installed in python. lead to. The page cannot be opened.
After downloading, extract and save to a directory. I put it in the Script directory under Python installation directory. Because I assigned this directory to my environment variable.
Finally, go to Firefox and download the latest browser. (There is an option during installation, it is best to turn off the automatic upgrade).
Once these are installed, you can use them.:
It takes some time for the page to load, in order to ensure that it loads properly. We'll let him sleep for ten seconds.
Final completion: (don't worry about these details yet)
At this point, the study of "Python+selenium+firefox how to simulate logging in to Weibo and crawling data" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.