Skip to main content

Fetches files of desired type from common crawler's database

Project description

CmonCrawl-Fetcher

Downloads desired files from Common Crawl data by filetype

Usage

usage: cmoncrawl-fetcher.py [-h] -l <limit> -f FILETYPES [FILETYPES ...] [-p NUM_PROCS] -o OUTPUT [-t TOLERANCE]

Python package that downloads files from common crawler's database. An example usage is `cmoncrawl-fetcher.py -l 5 -f jpg png -o out_dir` This'll make it download 5 jpgs and 5 pngs into out_dir

options:
  -h, --help            show this help message and exit
  -l <limit>, --limit <limit>
                        Number of images per filetype desired
  -f FILETYPES [FILETYPES ...], --filetypes FILETYPES [FILETYPES ...]
                        Desired filetypes to fetch
  -p NUM_PROCS, --num_procs NUM_PROCS
                        Number of processes to use, default is 1
  -o OUTPUT, --output OUTPUT
                        Output directory to store downloaded files
  -t TOLERANCE, --tolerance TOLERANCE
                        Number of fails for a given hostname before we ignore this host

Required arguments are the desired file type (input the extension), the output directory, and the number of desired files for each extension.

By default we prioritize those with Content Types that signify the filetype over the extension, we store corresponding content types for file types in filetype_config.json, we currently support 69 file types.

Contributing

  • Package installation uses poetry, but this is subject to change in the future.

  • We use git-flow workflows for our development. Depending on the kind of feature you are contributing, create a hotfix branch or a feature branch. Installation instructions are here.

  • We also require a pre-commit hook. You can follow the instructions here to install them.

  • You will need to install the hooks in the yaml file in the repository using the following command: pre-commit install.

License

We've released this project under GPLv3. Check the LICENSE file for more details.

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

cmoncrawl_fetcher-0.1.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmoncrawl_fetcher-0.1.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file cmoncrawl_fetcher-0.1.0.tar.gz.

File metadata

  • Download URL: cmoncrawl_fetcher-0.1.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/6.2.6-76060206-generic

File hashes

Hashes for cmoncrawl_fetcher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 169fe3a2e62c00775722ca8b23c491091d989c6a5c6d27be7a93dcf7731ebc6c
MD5 6016f0aba373c79ed274e950ae083c0c
BLAKE2b-256 beb5e009248a03c30210210ede5fca30b0ded14620fc8d194c13ee849460fd4d

See more details on using hashes here.

File details

Details for the file cmoncrawl_fetcher-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cmoncrawl_fetcher-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.6 Linux/6.2.6-76060206-generic

File hashes

Hashes for cmoncrawl_fetcher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 108c2d016c4f83c931cf3fbfc22b5c57f6a1dc481bd2e2834586f62e78f6437f
MD5 8c3607eabe56299f4590aafc527a0de0
BLAKE2b-256 1305ec44ad2632ca13749961ef68626dfab3f429418ef9de23f2ca7d59b5a7d9

See more details on using hashes here.

Supported by

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