mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3mobile wallpaper 4
150 words
1 minute
Python Web Crawler Environment Setup
2024-01-01

Environment Setup#

python3/Request libraries/Parsing libraries/Databases/Repositories/Web libraries/App scraping libraries/Web crawler framework libraries

  • Python 3

    • Windows 11 can be downloaded directly from the Store
    • On Linux, apt-get install python3
  • Request libraries

    • requests

      pip3 install requests

    • selenium

      pip install selenium

    • ChromeDriver

      1. View the Chrome version in About Chrome
      2. Download the corresponding version from ChromeDriver
      3. Add ChromeDriver to your environment variables
    • phantomJS

      The new Selenium versions no longer support phantomJS; you can use it directly with ChromeDriver

      Verification:

      from selenium import webdriver
      from selenium.webdriver.chrome.options import Options
      chrome_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

        Windows

      • Install tesserocr

        Windows using pip install <name>.whl

      • Verification

        202401011649852.png

        import tesserocr
        from PIL import Image
        image = Image.open('G:/codeS/backOnGithub/Jupyter/spider/image.png')
        print(tesserocr.image_to_text(image))

        Note: If you encounter File “tesserocr.pyx”, line 2580, in tesserocr._tesserocr.image_to_textRuntimeError: Failed to init API, possibly an invalid tessdata path error, you need to first put tessdata into the error folder

  • Databases

    • MySQL
    • MongoDB
    • Redis
  • Repositories

    • 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 crawling frameworks

    • pyspider

      pip install pyspider

      If Windows 11 cannot run it, you can refer to this article

    • scrapy

    • scrapy-splash

    • scrapy-redis

Share

If this article helped you, please share it with others!

Python Web Crawler Environment Setup
https://dreaife.tokyo/en/posts/python-env-setup/
Author
dreaife
Published at
2024-01-01
License
CC BY-NC-SA 4.0

Some information may be outdated

Related Posts Smart
1
Running pyspider on Windows 11 with Docker
spider If installation problems occur when using pyspider on Windows 11, Docker can be used as an alternative installation method. This post provides examples using Docker commands and docker-compose. After startup, you can verify whether pyspider is running correctly by visiting http://localhost:5000/.
2
A Summary of My Thoughts on the Market on X
market Drawing on complex systems and game theory, this post unpacks the underlying logic of market dynamics, emotional reflexivity, and the consensus underpinning monetary value, helping readers look beyond short-term volatility and develop a deeper understanding of market expectations and inflation transmission.
3
Basic On-Chain Operations for EOA Wallets
WEB3 Quickly master the core on-chain operations of Web3 wallets. Covers the principles behind creating EOA and HD wallets, mnemonic generation and the BIP derivation process, an in-depth look at SIWE and EIP-712 on-chain verification, and the full lifecycle of transaction construction, signing, and broadcasting to help you understand the underlying logic of wallets.
4
About an EOA Wallet Signature Verification and Related Content
WEB3 A developer-focused guide to EOA wallet signature verification, covering secp256k1, ECDSA r/s/v signatures, public key recovery, keccak-256 address derivation, and how SIWE proves wallet ownership without exposing the private key.
5
An EVM wallet login interface for EOAs
WEB3 A practical EVM/EOA wallet login walkthrough covering connect wallet, SIWE-style messages, wagmi signing, nonce handling, and backend verification, explaining why login separates address connection from signature-based ownership proof.

Table of Contents