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.21.tar.gz (44.4 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.21-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: WrapperXSelector-0.1.21.tar.gz
  • Upload date:
  • Size: 44.4 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.21.tar.gz
Algorithm Hash digest
SHA256 47479acd4f57c993620933ad665700f351321b2f62c9e21e3f2d321e0b7c1c18
MD5 845bae7cfa03ebe8906b23758d110989
BLAKE2b-256 7f285e8d9b6281e8b448e029514ea5d5135be079fd81c2f0cb1369ba4591779f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for WrapperXSelector-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 17537160f2b39666046dd7ddccf0bfed4fbc84515499ccf59a7adfcce140f7b0
MD5 9eda97070e8ac1d3ae2b62c69abd42e6
BLAKE2b-256 df6589cd6ccbd4cbd6a08c72081f662f9ec3c2d93367f3df062f529704df250e

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