Skip to main content

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

python_async_scrapestack_client-0.1.2.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page