Skip to main content

PyPI license

content-downloader

Python package to download files on any topic in bulk.

content-downloader supports Python 2 as well as Python 3.

Installation

To install content-downloader, simply,

$ pip install ctdl

Command line usage

$ ctdl [-h] [-f FILE_TYPE] [-l LIMIT] [-d DIRECTORY] [-a] [query]

Optional arguments are:

  • -f FILE_TYPE : set the file type. (can take values like ppt, pdf, xml, etc.)

    Default value: pdf
  • -l LIMIT : specify the number of files to download.

    Default value: 10
  • -d DIRECTORY : specify the directory where files will be stored.

    Default: A directory with same name as the search query in the current directory.

Here are some examples:

  • To get list of available filetypes:

$ ctdl -a

  • To download pdf files on topic ‘python’:

$ ctdl python This is the default behaviour which will download 10 pdf files in a folder named ‘python’ in current directory.

  • To download 3 ppt files on ‘health’:

$ ctdl -f ppt -l 3 health

  • To expicitly specify download folder:

$ ctdl -d /home/nikhil/Desktop/ml-pdfs machine learning

Usage in Python files

from ctdl import ctdl

filetype = 'ppt'
limit = 5
directory = '/home/nikhil/Desktop/ml-pdfs'
query = 'machine learning using python'

ctdl.download_content(query, filetype, directory, limit)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctdl-1.0.1.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file ctdl-1.0.1.tar.gz.

File metadata

  • Download URL: ctdl-1.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ctdl-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cf5a85754df814cf90eae4342d23b782f5712e5d7160a5d63d955188793086af
MD5 f7f2cd0d98d21d16c8e2962216256589
BLAKE2b-256 eee667c62c05f9de5764a31d3115fcf766deba919a0955aa7113fa70ddf4bb9f

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.0

1 file

1.4.6

1 file

1.4.5

1 file

1.4.4

1 file

1.4.3

1 file

1.4.2

1 file

1.4.1

1 file

1.4

1 file

1.3

1 file

1.2

1 file

1.1

1 file

This release

1.0.1 This release

1 file

1.0.0

1 file

1.0

1 file

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