{"id":21620628,"url":"https://github.com/raybb/openlibrary-nyt-bot","last_synced_at":"2026-05-15T23:01:58.040Z","repository":{"id":38819827,"uuid":"392346397","full_name":"RayBB/openlibrary-nyt-bot","owner":"RayBB","description":"The NYT Best Seller Bot for Open Library","archived":false,"fork":false,"pushed_at":"2024-05-03T21:46:04.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T21:35:33.979Z","etag":null,"topics":["openlibrary"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RayBB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-08-03T14:31:52.000Z","updated_at":"2024-05-03T21:46:01.000Z","dependencies_parsed_at":"2024-11-25T00:00:44.488Z","dependency_job_id":null,"html_url":"https://github.com/RayBB/openlibrary-nyt-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayBB%2Fopenlibrary-nyt-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayBB%2Fopenlibrary-nyt-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayBB%2Fopenlibrary-nyt-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayBB%2Fopenlibrary-nyt-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RayBB","download_url":"https://codeload.github.com/RayBB/openlibrary-nyt-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244278666,"owners_count":20427552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["openlibrary"],"created_at":"2024-11-24T23:12:14.302Z","updated_at":"2026-05-15T23:01:57.982Z","avatar_url":"https://github.com/RayBB.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openlibrary-nyt-bot\n\nThe bot has three goals:\n1. Notify Open Library of new books that they may not have imported yet\n2. Tag NYT best sellers and reviews\n3. Add links to NYT reviews\n\n## Current Status\n\n### Account\nThe changes made by this bot are visible [here](https://openlibrary.org/people/nyt_bestsellers_bot). The profile mentions another repo but this is the actual code running.\n\n### Schedule\nThis bot runs via GitHub Actions [here](https://github.com/RayBB/openlibrary-nyt-bot-temp/blob/main/.github/workflows/run_scripts.yaml) every Wednesday at 10AM EST. You can see the results of the actions [here](https://github.com/RayBB/openlibrary-nyt-bot-temp/actions). \n\nPS: This workflow is automatically [disabled every 60 days](https://docs.github.com/en/actions/managing-workflow-runs/disabling-and-enabling-a-workflow) by GitHub unless there is activity in the repo. Thankfully, they send me an email with one button to click to re-enable it.\n\n## Setup\n\n1. Install requirements `pip install -r requirements.txt`\n2. Set the environment variable `NYT_API_KEY` to be able to call the NYT API\n3. [Configure](https://github.com/internetarchive/openlibrary-client#configuration) Open Library CLI\n   1. Alternatively, set `OL_ACCESS_KEY` and `OL_SECRET_KEY` env vars\n4. Run `python nyt_bestseller_collector.py` - this will get the bestsellers for this month and put them in `result.json`\n5. Run `python add_nyt_bestseller_tag.py --dry-run=False` to add the bestseller tags\n6. Run `python add_nyt_review_link.py --dry-run=False` to add reviews\n\n`.env` file is supported and probably the easiest way to set env vars\n\n## Bulk Imports\n\nNYT bot was run in August 2021 to do bulk imports for the following historical data:\n* [nyt_bestsellers_2008_06_03_to_2021_08_03](https://archive.org/details/nyt_bestsellers_2008_06_03_to_2021_08_03) - scraped from public api via script here.\n* [all_nyt_book_review_2021_08_03](https://archive.org/details/all_nyt_book_review_2021_08_03) - using a NYT database dump since public apis don't make it easy to get old data.\n\n### Stats\n\n#### Best Sellers\n* Best Sellers From NYT API: 20,946\n* Best Sellers missing from Open Library: 3,955\n* Missing bestsellers successfully imported: 370\n* Subject tags added to all books found in Open Library\n\n#### Reviews\n* Reviews From NYT API: 24,975\n* Reviews missing from Open Library: 2,889\n* Missing reviewed books successfully imported: 1,435\n* Subject tag and link added to all books found in open library\n\n## Testing\n\nChecklist for bestsellers:\n- If no nyt subjects exist, add them ✅\n- If both nyt subjects exist, make no change ✅\n- If one nyt subject is missing, add the other - not yet\n\nChecklist for reviews:\n- If review doesn't exist, add it ✅\n- If review subject doesn't exist, add it ✅\n\n## Limitations\n\nThere is no way to get all reviews. But we can get reviews of bestsellers. \nAs such, reviews of books aren't on the bestseller list are not added by this bot.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraybb%2Fopenlibrary-nyt-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraybb%2Fopenlibrary-nyt-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraybb%2Fopenlibrary-nyt-bot/lists"}