pcdt-scraper
A PyChromeDevTools based WebScraper and selenium like syntax.
Introduction
Sometimes website blocks your requests or aiohttp web request but don't block chrome web request.
For this solution, here is "pcdt-scraper".
Compatability
Python 3.6+ is required.
Installation
pip install pcdt-scraper
or
pip3 install pcdt-scraper
Usage:
- First run chromium or chrome remote instance
chromium --remote-debugging-port=9222 --remote-allow-origins=*
or You can run as headless mode.
chromium --remote-debugging-port=9222 --remote-allow-origins=* --headless
- Then run python code
from pcdt_scraper import WebScraper
scraper = WebScraper()
url = "https://www.example.com/"
try:
# Navigate to a page
if scraper.get(url):
# Get page content
content = scraper.get_page_content()
# find element by class name
text = scraper.find_element_by_class_name('class_name').text()
print(text)
except Exception as e:
print(f"An error occurred: {str(e)}")
finally:
scraper.close()
Metadata
Release files for pcdt-scraper 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pcdt_scraper-1.0.1.tar.gz | 3.8 kB | Without provenance | Details for pcdt_scraper-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pcdt_scraper-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pcdt_scraper-1.0.1-py3-none-any.whl |
Total release size: 7.8 kB
Release files / pcdt_scraper-1.0.1.tar.gz
| Download URL | pcdt_scraper-1.0.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67679386b675f5b97df85447598836ad4022d29cdec23ba1d7a5f2189f9488fa
|
|
BLAKE2b-256 checksum How to use checksums |
d8b10343ce9a710fe1565936a2f2e3610dd864f586f662bdca97a384b4eebc40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / pcdt_scraper-1.0.1-py3-none-any.whl
| Download URL | pcdt_scraper-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6ae36b6a248f11787b5be348b337a92e30413c7b71b259a24d6e30c9bf16981
|
|
BLAKE2b-256 checksum How to use checksums |
653eda074c58be72e37425c5b92913ff1c04c8ce5c1f2475ab63ffdb39befb26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for pcdt-scraper 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.