Environment Setup
python3/request libraries/parsing libraries/databases/storage libraries/web libraries/app scraping libraries/web scraping frameworks
-
python3
- On Windows 11, you can download it directly from the Store (
- On Linux:
apt-get install python3
-
Request libraries
-
requests
pip3 install requests -
selenium
pip install selenium -
chromeDriver
- Check the Chrome version under About
- Download the corresponding version from chromeDriver
- Add chromeDriver to the environment variables
-
phantomJSNewer versions of selenium no longer support phantomJS. You can use chromedriver directly instead.
Verification:
from selenium import webdriverfrom selenium.webdriver.chrome.options import Optionschrome_options = Options()chrome_options.add_argument('--headless')chrome_options.add_argument('--disable-gpu')driver = webdriver.Chrome(options=chrome_options)driver.get("<https://dreaife.icu/>")print(driver.current_url) -
aiohttp
pip install aiodns
-
-
Parsing libraries
-
lxml
pip install lxml -
beautifulsoup4
pip install beautifulsoup4 -
pyquery
pip install pyquery -
tesserocr
-
Install tesseract
-
Install tesserocr
For Windows, use
pip install <name>.whlto install it -
Verification
import tesserocrfrom PIL import Imageimage = Image.open('G:/codeS/backOnGithub/Jupyter/spider/image.png')print(tesserocr.image_to_text(image))Note: If the File “tesserocr.pyx”, line 2580, in tesserocr._tesserocr.image_to_textRuntimeError: Failed to init API, possibly an invalid tessdata path error occurs, first place tesseract’s test_data in the folder indicated by the error
-
-
-
Databases
- MySQL
- MongoDB
- Redis
-
Storage libraries
-
PyMySQL
pip install pymysql -
PyMongo
pip install pymongo -
redis-py
pip install redis -
RedisDump
Install ruby
gem install redis-dump
-
-
Web libraries
-
Flask
pip install flask -
Tornado
pip install tornado
-
-
App scraping libraries
-
charles
-
mitmproxy
pip install mitmproxy -
appium
-
-
Web scraping frameworks
-
pyspider
pip install pyspiderIf it does not run on Windows 11, see this post of mine
-
scrapy
-
scrapy-splash
-
scrapy-redis
-
If this article helped you, please share it with others!
Some information may be outdated





