Skip to main content

Basic Web Scraper

Project Description

This package can be used for simple automated web surfing / scraping.

Create classes inheriting the included BasicSpider class to create custom behavior to suit your requirements.


Usage Example

from basic_web_scraper.BasicSpider import BasicSpider

class CustomSpider(BasicSpider):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

    def custom_operation(self, threshold):
        """
        Scroll to predefined threshold.
        If past threshold, scroll back up.
        """
        if self.get_page_y_offset() < threshold:
            self.mousewheel_vscroll(number_of_scrolls=2)

        else:
            y_difference = self.get_page_y_offset() - threshold
            self.smooth_vscroll_up_by(y_difference)

More Description

Driver

In order for the package to work, you must include a geckodriver.exe in your local project directory. Otherwise a GeckoNotFoundException will be raised

Note: This package currently only supports working with The Firefox geckodriver, which can be downloaded from here

BasicSpider.py

Use this as the superclass for your own project's spider

This Spider allows you to do basic things like goto a url, scroll down the page in different ways, refresh the page, etc..

It acts as an interface to selenium.webdriver to make setting up a project easier

More docs will be added in the future.

Metadata

Release files for basic-web-scraper 0.13.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 basic-web-scraper 0.13.7
File Size Uploaded
basic-web-scraper-0.13.7.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for basic-web-scraper 0.13.7
File Interpreter ABI Platform
basic_web_scraper-0.13.7-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / basic-web-scraper-0.13.7.tar.gz

Download URL basic-web-scraper-0.13.7.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e629e35f244b908b86efd2a34a2131461c17204576c9a865e5cbfa928984d0ff
BLAKE2b-256 checksum
How to use checksums
5ea8533865cb6295c3ee0626d2483ed1e5dfbc6caa16fa60bb32bb3d61889a8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

Release files / basic_web_scraper-0.13.7-py3-none-any.whl

Download URL basic_web_scraper-0.13.7-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b8e77c92398b953101735440156c7a470c19d94ee28a431d5da5e194ffa8841
BLAKE2b-256 checksum
How to use checksums
f03dc9768d9504fa05a2f29f8f6c6aa5106cccbcca9e4e8357d501674594db23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0
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