{"id":50487011,"url":"https://github.com/systemslibrarian/pressreader-news-scraper","last_synced_at":"2026-06-01T23:03:33.654Z","repository":{"id":309287631,"uuid":"1028001351","full_name":"systemslibrarian/pressreader-news-scraper","owner":"systemslibrarian","description":"A lightweight, extensible Python notebook that demonstrates how to fetch and store topic-based articles from the PressReader API using SQLite. Ideal for research, journalism, or data analysis workflows.","archived":false,"fork":false,"pushed_at":"2025-08-11T01:37:48.000Z","size":87,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T03:20:04.884Z","etag":null,"topics":["python-news-scraper-sqlite-pressreader"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemslibrarian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-28T21:45:19.000Z","updated_at":"2025-08-11T01:37:52.000Z","dependencies_parsed_at":"2025-08-11T03:20:06.160Z","dependency_job_id":null,"html_url":"https://github.com/systemslibrarian/pressreader-news-scraper","commit_stats":null,"previous_names":["systemslibrarian/pressreader-news-scraper"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/systemslibrarian/pressreader-news-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fpressreader-news-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fpressreader-news-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fpressreader-news-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fpressreader-news-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemslibrarian","download_url":"https://codeload.github.com/systemslibrarian/pressreader-news-scraper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fpressreader-news-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33797128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-news-scraper-sqlite-pressreader"],"created_at":"2026-06-01T23:03:30.151Z","updated_at":"2026-06-01T23:03:33.647Z","avatar_url":"https://github.com/systemslibrarian.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📰 PressReader API to SQLite  \n**Demo Project: Coffee Article Collector**\n\n\u003e 🔑 **Note:** You must set your own API key before running this notebook.\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/systemslibrarian/pressreader-news-scraper/blob/main/pressreader_api_to_sqlite.ipynb)\n\nThis notebook demonstrates how to query the [PressReader API](https://www.pressreader.com/) and store results in a **SQLite** database.  \nIt uses **coffee** as a sample keyword but can be adapted for any topic or term.  \n\nIt’s ideal for **researchers, librarians, and hobbyists** looking to explore topic-based news and publications.\n\n---\n\n## 🚀 Features\n- 🔍 Search the PressReader API for any keyword (default: `coffee`)\n- 🧠 Save article metadata (title, description, source, date, URL) to SQLite\n- 🔁 Prevent duplicate entries using article ID as the primary key\n- 📝 Output results in easy-to-read Markdown format\n- 🔐 Secure API key handling via environment variable\n\n---\n\n## 📦 Requirements\n\nInstall required dependencies:\n```bash\npip install requests pandas python-dotenv\n```\n\u003e `sqlite3` is built into Python, so no extra install is needed.\n\n---\n\n## 🔐 API Key Setup\n\nThis notebook uses the `PRESSREADER_API_KEY` environment variable.\n\n**In Google Colab**:\n```python\nimport os\nos.environ['PRESSREADER_API_KEY'] = 'your-api-key-here'\n```\n\n**Or using Colab Secrets**:\n```python\nfrom google.colab import userdata  \nuserdata.set_secret('PRESSREADER_API_KEY')\n```\n\n---\n\n## ▶️ How to Run\n\n1. **Open in Colab** → Click the badge at the top of this README.\n2. **Install dependencies** → Run the first cell.\n3. **Set your API key** → Add it via environment variable or Colab secrets.\n4. **Run all cells** → Fetch results, save to SQLite, and display Markdown summaries.\n\n---\n\n## 📄 Example Output\n\n```markdown\n## ☕ Coffee and Culture  \n**Publication**: Global Coffee Times  \n**Date**: 2025-07-28  \n**Description**: Exploring how coffee influences social rituals across continents.  \n**URL**: [Read More](https://www.pressreader.com/article/12345678)\n\n## ☕ Sustainable Coffee Farming  \n**Publication**: Eco Agri News  \n**Date**: 2025-07-25  \n**Description**: A closer look at regenerative practices in coffee production.  \n**URL**: [Read More](https://www.pressreader.com/article/98765432)\n```\n\n---\n\n## 📂 Project Files\n- `pressreader_api_to_sqlite.ipynb` → Main Colab notebook  \n- `README.md` → Project documentation  \n- `pressreader_coffee_results.db` → Created at runtime (not stored in repo)  \n\n---\n\n## 🧰 How It Works\n1. Sends a POST request to the PressReader Discovery API.\n2. Parses JSON results into structured article metadata.\n3. Saves each entry in a SQLite DB, skipping duplicates.\n4. Displays formatted Markdown summaries of the most recent articles.\n\n---\n\n## 🛠 Troubleshooting\n- **Invalid API Key** → Double-check `PRESSREADER_API_KEY` value.  \n- **Empty Results** → Adjust your search keyword/date range.  \n- **Rate Limits** → Wait and retry after a few minutes.\n\n---\n\n## ⚠️ Disclaimer\n- For educational/research purposes only.  \n- Respect PressReader’s terms of service and API limits.\n\n---\n\n## ✨ License\n[MIT License](LICENSE)\n\n---\n\n**Created by [Paul Clark](https://github.com/systemslibrarian)**  \nEmpowering Libraries Through Data and Innovation 📚⚙️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fpressreader-news-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemslibrarian%2Fpressreader-news-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fpressreader-news-scraper/lists"}