Skip to main content

Auto Generated by os-scrapy-cookiecutter

Project description

os-scrapy-aio-resolver

Build Status codecov PyPI - Python Version PyPI

This project provide a async DNS resolver.

Install

pip install os-scrapy-aio-resolver

You can run example spider directly in the project root path

scrapy crawl example

Usage

Settings

  • enable DNS resolver in the project settings file:

    DNS_RESOLVER = "os_scrapy_aio_resolver.AsyncResolver"
    
  • use asyncio reactor

    TWISTED_REACTOR = "twisted.internet.asyncioreactor.AsyncioSelectorReactor"
    

    or you can use os-scrapy command line to start crawling with -r asyncio

    os-scrapy crawl example -r asyncio
    
  • enable/disable DNS cache, set cache size

    DNSCACHE_ENABLED = True
    DNSCACHE_SIZE = 10000
    

Unit Tests

sh scripts/test.sh

License

MIT licensed.

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

os_scrapy_aio_resolver-0.0.3.tar.gz (6.7 kB view hashes)

Uploaded source

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