Export "Saved Stories" from Apple News to SQLite
Project description
apple-news-to-sqlite
Export Apple News Saved Stories to SQLite
Install
pip install apple-news-to-sqlite
Source Code
Usage
apple-news-to-sqlite articles.db
apple-news-to-sqlite --dump
CLI Help
Usage: apple-news-to-sqlite [OPTIONS] [DB_PATH]
Export your Apple News saved stories/articles to a SQLite database
Example usage:
apple_news_to_sqlite articles.db
This will populate articles.db with an "articles" table containing information
about your saved articles.
Note: the contents of the articles themselves are not stored in the database,
only metadata about the article such as title, author, url, etc.
Options:
--version Show the version and exit.
--dump Output saved stories to standard output
--schema Create database schema and exit
--help Show this message and exit.
Using apple-news-to-sqlite in your own Python code
get_saved_articles()
returns a list of dictionaries, each representing a saved article with the
following keys (all strings):
* id
* url
* title
* description
* image
* author
>>> from apple_news_to_sqlite import get_saved_articles
>>> articles = get_saved_articles()
Contributing
Contributions of all types are welcome! Fork the repo, make a branch, and submit a PR.
See README_DEV.md for developer notes.
Thanks
Thanks to Simon Willison who inspired this project with his excellent "everything-to-sqlite" dogsheep project.
Thanks Simon also for the excellent tools sqlite-utils and Datasette.
Thanks also to Dave Bullock who inspired this project and helped tremendously with the reverse engineering and initial code.
License
MIT License
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
Built Distribution
Hashes for apple_news_to_sqlite-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e517ef1ea97d166ed0dbe11755637bd44b14b8f7fef8601ed31a14a0a72ca08 |
|
MD5 | cb447eefaf6558cc297bf5f451bc0657 |
|
BLAKE2b-256 | 8f8239e31bc0b59135b7f19de824d6cd7b924d1378235819355a9aef909c4da0 |
Hashes for apple_news_to_sqlite-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5d0512f7aed64dbc53f0696d653e70cb168b23efb0b790cd4dc6caf89aa3fee |
|
MD5 | e93654cdce37c27c25056c01a3e4b82a |
|
BLAKE2b-256 | a57f44263bd7d8cb02f4a5469349a8a1dc47afd07b64403bf83d63b666f07705 |