Skip to main content

scrapyu

Build Status codecov PyPI - Python Version GitHub GitHub stars GitHub forks

UserAgentMiddleware

# settings.py
USERAGENT_TYPE = 'firefox'
DOWNLOADER_MIDDLEWARES = {
   'scrapyu.UserAgentMiddleware': 543,
}

MarkdownPipeline

# settings.py
MARKDOWNS_STORE = 'news'
ITEM_PIPELINES = {
    'scrapyu.MarkdownPipeline': 300,
}
# items.py
import scrapy

class MarkdownItem(scrapy.Item):
    html = scrapy.Field()
    filename = scrapy.Field()

FirefoxCookiesMiddleware

# settings.py
GECKODRIVER_PATH = 'geckodriver'
DOWNLOADER_MIDDLEWARES = {
   'scrapyu.FirefoxCookiesMiddleware': 543,
}

MongoDBPipeline

# settings.py
MONGODB_URI = 'mongodb://localhost:27017'
# or
# MONGODB_HOST = 'localhost'
# MONGODB_PORT = 27017
MONGODB_DATABASE = 'scrapyu'
MONGODB_COLLECTION = 'items'
MONGODB_BUFFER_LENGTH = 100
MONGODB_UNIQUE_KEY = 'title name'       # use only if no buffer
# or
# MONGODB_UNIQUE_KEY = ['title', 'name']
# MONGODB_UNIQUE_KEY = ('title', 'name')
ITEM_PIPELINES = {
    'scrapyu.MongoDBPipeline': 300,
}

RedisDupeFilter

# settings.py
DUPEFILTER_CLASS = 'scrapyu.RedisDupeFilter'
REDIS_DUPE_HOST = 'localhost'
REDIS_DUPE_PORT = 6379
REDIS_DUPE_DATABASE = 0
REDIS_DUPE_PASSWORD = 'password'
REDIS_DUPE_KEY = 'requests'
REDIS_DUPE_IGNORE_URL = r'http://scrapytest.org/\d+'

genspider

scrapyu genspider -l

results in :

Available templates:
  single
  single_splash

generate a single file spider

scrapyu genspider python www.python.org -t single

generate a single file spider, integration splash

scrapyu genspider python www.python.org -t single_splash

Metadata

Release files for scrapyu 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scrapyu 0.1.12
File Size Uploaded Provenance Actions
scrapyu-0.1.12.tar.gz 8.0 kB Without provenance Details for scrapyu-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scrapyu 0.1.12
File Interpreter ABI Platform Actions
scrapyu-0.1.12-py3-none-any.whl Python 3 none any Details for scrapyu-0.1.12-py3-none-any.whl

Total release size: 17.7 kB

Release files / scrapyu-0.1.12.tar.gz

Download URL scrapyu-0.1.12.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
25d53001063d9da178ab2aa42afe6ac2852c9b4ab8310339a75fc0895c291213
BLAKE2b-256 checksum
How to use checksums
f0a2ccf5ba2e321a4c8c7bc998960183d021da2f1c84bbc0b8ae9858ae7c11ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.3 Windows/7

Release files / scrapyu-0.1.12-py3-none-any.whl

Download URL scrapyu-0.1.12-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
569813efe543ce972a5ad6e2c35604a4db45aad44aae61494e5959d11d6a5242
BLAKE2b-256 checksum
How to use checksums
c8f0706bd41a0f9be2d7533c675d6285611ed1fd3bc60eee9d7c52ce9e4f8382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.3 Windows/7

Security for scrapyu 0.1.12

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page