Read today's CNN Lite articles
Project description
cnnlite
Description
cnnlite is a web scraper for CNN Lite. This package collects CNN Lite articles at https://lite.cnn.com.
Installation
>>> pip install cnnlite
Usage
# instantiate scraper
import cnnlite
from pprint import pprint
# start up scraper
scraper = cnnlite.CNNLite()
# export all articles to a json file
# default name: 'cnn_lite_<timestamp>.json'
scraper.to_json_file()
# show sample of headlines and URL list
print(scraper.headlines[:5])
print(scraper.urls[:5])
# large collection / nest dict containing each article for the day
docs = scraper.all_articles
# articles can be access one at a time too
article_name = scraper.headlines[0]
pprint(docs[article_name])
Sample CNN Lite Home Page and Output JSON
Bot Etiquetee
Be a good bot and comply with the publisher's robots.txt guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnnlite-0.0.1.tar.gz
(902.7 kB
view details)
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 cnnlite-0.0.1.tar.gz.
File metadata
- Download URL: cnnlite-0.0.1.tar.gz
- Upload date:
- Size: 902.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dfc9d76acc88b71a626e59f864b071fc895d635236624a3ba6ecffbfd3bcf8c
|
|
| MD5 |
fe680552fae71f7ed7a852387d00615f
|
|
| BLAKE2b-256 |
efd212d25f960a3fbab1b6a709e8ad55fdcea683cc778f17d7a9dcadb5eeb39a
|
File details
Details for the file cnnlite-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cnnlite-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30597f5416079462cc25f14731be32122bb8c8a25c12e4b4303a42a8acfec6f0
|
|
| MD5 |
4375b6b78f25f6fc717642280623c40f
|
|
| BLAKE2b-256 |
332c323c7db168167f76a44c7706ada65e77b31f6dfe33544902f30b8386ed1d
|