Skip to main content

WrapperXSelector is an intuitive tool that empowers users to effortlessly create scraping wrappers. Seamlessly combining the art of crafting with powerful scraping capabilities, it allows users to select and store XPath configurations for later use in efficient website data harvesting.

Project description

WrapperXSelector

WrapperXSelector is a tool that simplifies the process of generating web scraping wrappers for Selenium-loaded HTML pages. It provides an interactive user interface for users to select and define the elements they want to scrape on a website, and then generates corresponding Selenium XPath selectors for automation.

Features

  • User-Friendly Interface: WrapperXSelector offers a user-friendly interface for selecting and defining elements on a Selenium-loaded HTML page.
  • XPath Generation: Automatically generates XPath selectors based on user-defined elements for web scraping automation.
  • Dynamic Wrapping: Supports dynamic websites by allowing users to interact with elements before generating the wrapper.

How It Works

  1. Setup: Start by providing the URL of the Selenium-loaded HTML page you want to scrape.
  2. Interactive Selection: Use the interactive interface to click and select elements on the page that you want to scrape.
  3. XPath Generation: WrapperXSelector dynamically generates XPath selectors for the selected elements.
  4. Wrapper Output: Outputs the generated wrapper in JSON format, ready to be used for web scraping automation.

Usage

from WrapperXSelector import generateWrapper

# Provide the wrapper name, URL, and optional repeated pattern parameter
wrapper_name = "example_wrapper"
url = "https://example.com"
repeated_pattern = "yes"  # Set to "yes" if the pattern repeats, otherwise omit or set to "no"

# Generate the wrapper
wrapper_file = generateWrapper(wrapper_name, url, repeated_pattern)
print(f"Wrapper generated and saved to {wrapper_file}")

pip install WrapperXSelector

**Dependencies:**

- [Selenium](https://pypi.org/project/selenium/)
- [ChromeDriver](https://pypi.org/project/webdriver-manager/)


## License

**MIT License.** See [LICENSE](LICENSE) for details.

## Disclaimer

Intended for educational and legal use only. Users must comply with the terms of service of scraped websites and applicable laws and regulations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

WrapperXSelector-0.1.10.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WrapperXSelector-0.1.10-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file WrapperXSelector-0.1.10.tar.gz.

File metadata

  • Download URL: WrapperXSelector-0.1.10.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for WrapperXSelector-0.1.10.tar.gz
Algorithm Hash digest
SHA256 5afb8296b403311fc8819e513715c5d13dab15b8656a53d1aa0b73c3def81da9
MD5 d9bbc3909ba5f058ddb52fa67ec71574
BLAKE2b-256 aeba503cb10b8ef7a1ca2e0510f59435a647d17caac495da6f82c99e29fa9ec0

See more details on using hashes here.

File details

Details for the file WrapperXSelector-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for WrapperXSelector-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b701e3dafaf255be50dd3c9af44288ef9986ad19369aef029570fe4a886aad66
MD5 ab5fd63a6802290baa22ce3c01ccaec4
BLAKE2b-256 f7498b3b7c8b8259707813371c538f97b73e1f6e795277611984d1ccd0179642

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page