Grabs page & article titles from lists of URLs contained in files passed in as arguments
Project description
title_grabber
Usage instructions
- Just feed it 1 or more files containing URLs (1 per line)
python -m title_grabber /abs/path/2/urls1.csv rel/path/2/urls2.csv
- Optionally, change the output file:
python -m title_grabber -o output.csv /abs/path/2/urls1.csv rel/path/2/urls2.csv
- See all available config options:
python -m title_grabber -h
usage: title_grabber [-h] [-o OUT_FILE] [--connect-timeout TIMEOUT]
[--read-timeout TIMEOUT] [-r RETRIES] [-t THREADS] [-d]
[FILES [FILES ...]]
positional arguments:
FILES 1 or more CSV files containing URLs (1 per line)
optional arguments:
-h, --help show this help message and exit
-o OUT_FILE, --output OUT_FILE
Output file (defaults to out.csv)
--connect-timeout TIMEOUT
HTTP connect timeout. Defaults to the value of the
CONNECT_TIMEOUT env var or 10
--read-timeout TIMEOUT
HTTP read timeout. Defaults to the value of the
READ_TIMEOUT env var or 15
--max-redirects REDIRECTS
Max. # of HTTP redirects to follow. Defaults to the
value of the MAX_REDIRECTS env var or 5
-r RETRIES, --max-retries RETRIES
Max. # of times to retry failed HTTP reqs. Defaults to
the value of the MAX_RETRIES env var or 3
-t THREADS, --max-threads THREADS
Max. # of threads to use. Defaults to the value of the
MAX_THREADS env var or the # of logical processors in
the system (8)
-d, --debug Log to STDOUT instead of to a file in the CWD.
Defaults to the value of the DEBUG env var or False
-V, --version Print program version and exit
dev setup instructions
- Clone the project
git clone git@github.com:cristianrasch/title_grabber.git
- Create a new virtual environment for it
cd title_grabber && python3 -m venv venv
- Install its dependencies
pip install -r requirements.txt
- Run the test suite to make sure everything is set up OK
python -m unittest discover -v -s title_grabber/tests/
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file title_grabber-cristianrasch-0.2.0.tar.gz.
File metadata
- Download URL: title_grabber-cristianrasch-0.2.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eb96ec4190ceab8a2ffe21699de749876bd0abdf6f81a851671ad5959e5e454
|
|
| MD5 |
a4df8c357cf2b038819cbb540078cd40
|
|
| BLAKE2b-256 |
73bcd3105eabe296ebf69dcb67a3584b6ac4a9e5d7f0e45c261690342473711d
|
File details
Details for the file title_grabber_cristianrasch-0.2.0-py3-none-any.whl.
File metadata
- Download URL: title_grabber_cristianrasch-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc7c8b6ae3a0a599ca1ebf5f0cf56cacf811a73f50f0beaa83ee73ca82764e28
|
|
| MD5 |
948bc57b622387bb515d22af799ae532
|
|
| BLAKE2b-256 |
32a3d2fef4ebbb1061c61a34c7d37addd09aec4053f6a50bf663b7eef1ccc6bc
|