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
- Setup: Start by providing the URL of the Selenium-loaded HTML page you want to scrape.
- Interactive Selection: Use the interactive interface to click and select elements on the page that you want to scrape.
- XPath Generation: WrapperXSelector dynamically generates XPath selectors for the selected elements.
- 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
Release history Release notifications | RSS feed
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.19.tar.gz
(44.4 kB
view hashes)
Built Distribution
Close
Hashes for WrapperXSelector-0.1.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99c15290eb6ff5967ae5d5dbf145cdf9c4ea957b9bbafbd686cbe24043cecfa8 |
|
MD5 | 84c7badcf604a9ecc5bd8518370d7488 |
|
BLAKE2b-256 | 1b205874847c670c550205ceae238aa7f09bc5eb14b1060105050464acdd4feb |