An asynchronous client for web scraping using scrapestack.
Project description
pasc (python-async-scrapestack-client)
If you need to use this but are confused by the docs, then submit an issue and I will create formal docs. Right now this functions as a dependency for personal projects.
links
description
Asynchronous requests for scrapestack.
install
Install with pip:
pip install python-async-scrapestack-client
python-simple-secrets-manager is installed as a dependency.
once you get your scrapestack api key, you can add it to pssm with:
secrets keep -a -uid scrapestack -key [YOUR API TOKEN]
usage
request urls
from pasc import Retriever
retriever = Retriever()
batch = retriever.fetch(["https://www.duckduckgo.com"] * 10)
access results
# from pasc import Response # * type import, not required
response: Response = batch.item[0]
print(response.url)
print(response.time)
print(response.code)
print(response.detail)
print(response.data)
# If response is rawtext like html, call:
html = response.data.decode("utf8")
todo
- add back in progress bar
- resolve event loop issue for jupyter notebooks
- add better docs if requested
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
Built Distribution
Close
Hashes for python_async_scrapestack_client-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6431cc6d439fd466c377625c7c68b54296a371e56eb4aebab9c3298aa48b5ce8 |
|
MD5 | 157a53233974c23da2ba8ec5555af157 |
|
BLAKE2b-256 | 9a440c6d09f4f82e01315d53ac1ee3e06d37c931c9fae23f8a6cbea9d4fd7d6c |
Close
Hashes for python_async_scrapestack_client-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b8f1d6471e0014075f89559cdea034e562961af69c2bba66b17fede231cafe6 |
|
MD5 | 9685aecab2ba03013e76c6cfdfcc5406 |
|
BLAKE2b-256 | 6c995d498776fd06c6ac918d15e9c06d51335b0a351f000d71dfa76094e4a243 |