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.3.tar.gz (2.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: WrapperXSelector-0.1.3.tar.gz
  • Upload date:
  • Size: 2.2 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.3.tar.gz
Algorithm Hash digest
SHA256 ec31f983d245b3c80c27f9fa46ad90d2e8a04de390c4219837e565788de96079
MD5 8c7389a24ea6aef76c3079d9d8e66899
BLAKE2b-256 2b28f99cb12b993df22c12447493bbc6a9eea92f747d35714ca9541623d005b9

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