Skip to main content

XSCRAPERS

The XSCRAPERS package provides an OOP interface to some simple webscraping techniques.

A base use case can be to load some pages to Beautifulsoup Elements. This package allows to load the URLs concurrently using multiple threads, which allows to safe an enormous amount of time.

import xscrapers.webscraper as ws

URLS = [
    "https://www.google.com/",
    "https://www.amazon.com/",
    "https://www.youtube.com/",
]
PARSER = "html.parser"
web_scraper = ws.Webscraper(PARSER, verbose=True)
web_scraper.load(URLS)
web_scraper.parse()

Note that herein, the data scraped is stored in the data attribute of the webscraper. The URLs parsed are stored in the url attribute.

Downloading the Firefox Geckodriver

Linux

See this link for a good explanation. In short, the steps are:

  1. Download the geckodriver from the mozilla GitHub release page, note to change the X for the version you want to download

    wget https://github.com/mozilla/geckodriver/releases/download/vX.XX.X/geckodriver-vX.XX.X-linux64.tar.gz
    
  2. Extract the file with

    tar -xvzf geckodriver*
    
  3. Make it executable

    chmod +x geckodriver
    
  4. In the last step, the driver can be added to the PATH environment variable, moved to the usr/local/bin folder, or can be given as full path to the Webdriver class as exe_path argument

    export PATH=$PATH:/path-to-extracted-file/
    sudo mv geckodriver /usr/local/bin/
    

Metadata

Release files for xscrapers 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xscrapers 0.0.7
File Size Uploaded
xscrapers-0.0.7.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xscrapers 0.0.7
File Interpreter ABI Platform
xscrapers-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 25.0 kB

Release files / xscrapers-0.0.7.tar.gz

Download URL xscrapers-0.0.7.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
387f4b8cdc5edf13feb9f1cf71794a6367dec9546eb8854363eee845e9d7b568
BLAKE2b-256 checksum
How to use checksums
f479b8ce2cd64a3fea7086e6c1351d7c0808710807a49a807de2d4b63f53d54c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.8.8 Linux/5.4.72-microsoft-standard-WSL2

Release files / xscrapers-0.0.7-py3-none-any.whl

Download URL xscrapers-0.0.7-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbe08f1426007a58b8678981fc890f36ed21c43443ff61c9765822f690d07d43
BLAKE2b-256 checksum
How to use checksums
bb591028f19bc039e212394d60448d9db4f3421a9dc2a4bd28c218e086d19f12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.8.8 Linux/5.4.72-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page