{"id":19467076,"url":"https://github.com/benlk/cota-reroute-pdf-rss","last_synced_at":"2026-05-16T09:01:54.683Z","repository":{"id":210318795,"uuid":"726220960","full_name":"benlk/cota-reroute-pdf-rss","owner":"benlk","description":"An RSS feed of alerts from COTA.com","archived":false,"fork":false,"pushed_at":"2025-02-12T03:55:01.000Z","size":68,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T04:37:30.288Z","etag":null,"topics":["central-ohio-transit-authority","cota","rss","scraper"],"latest_commit_sha":null,"homepage":"https://raw.githubusercontent.com/benlk/cota-reroute-pdf-rss/main/rss.xml","language":"PHP","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/benlk.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":"2023-12-01T19:51:38.000Z","updated_at":"2025-02-12T03:55:04.000Z","dependencies_parsed_at":"2024-02-12T16:52:38.137Z","dependency_job_id":"ce45bb68-e4f9-4ef6-a999-7c748785304d","html_url":"https://github.com/benlk/cota-reroute-pdf-rss","commit_stats":null,"previous_names":["benlk/cota-reroute-pdf-rss"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benlk%2Fcota-reroute-pdf-rss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benlk%2Fcota-reroute-pdf-rss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benlk%2Fcota-reroute-pdf-rss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benlk%2Fcota-reroute-pdf-rss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benlk","download_url":"https://codeload.github.com/benlk/cota-reroute-pdf-rss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240680827,"owners_count":19840314,"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":["central-ohio-transit-authority","cota","rss","scraper"],"created_at":"2024-11-10T18:33:11.488Z","updated_at":"2026-05-16T09:01:54.612Z","avatar_url":"https://github.com/benlk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Central Ohio Transit Authority Reroute PDF Feeds\n\n**\u003e [Add this link to your feedreader](https://raw.githubusercontent.com/benlk/cota-reroute-pdf-rss/main/rss.xml) \u003c**\n\n**\u003e [View historical alerts](./alerts-log.csv) \u003c**\n\n## What\n\n![Screenshot of the banner seen at the top of cota.com. This banner advertises the December 2 Holiday Hop reroutes.](./banner.png)\n\nAn RSS feed of whenever COTA posts a new alert box in the header of [COTA.com](https://cota.com/). This is most-often used for notice of reroutes.\n\nThis feed updates once per day. If you need more-timely updates than that, I'm sorry.\n\nThis feed contains the following information, using [the screenshoted alert](https://web.archive.org/web/20231202002042/https://www.cota.com/) as an example:\n\n- The alert's header — `REROUTES AHEAD`\n- The alert's description — `Dec. 2 | Holiday Hop`\n- The link title — `LEARN MORE`\n- The link url — `https://www.cota.com/reroutes/cota-reroutes-holiday-hop-231202.pdf`\n- The date of the scrape that generated this alert\n\nThis feed does not contain:\n\n- Any information only found at the link\n- Any information parsed from the reroute PDF, such as:\n    - which lines are affected\n    - where the reroute is located\n    - where you can catch your bus\n- Any information not contained in the alert box\n\nIf you want additional information on items in this feed, you'll need to click the link and/or contact COTA.\n\n## Why\n\nWhen COTA posts a reroute PDF to COTA.com, they don't always announce it. When they do announce it, they only announce it on [enshittified](https://en.wikipedia.org/wiki/Enshittification) privately-owned social media networks: [Twitter](https://twitter.com/COTABus), [Facebook](https://www.facebook.com/cotabus/), [Instagram](https://www.instagram.com/cotabus/). If you don't have logins for those accounts, either you use a proxy like [Nitter](https://nitter.net/COTABus) or you're locked out.\n\nCOTA also sometimes posts a notice [via their GTFS feed](https://cota.com/data/) about the reroute, but historically speaking, their GTFS alerts only say that there will be a reroute affecting a route. Their alerts do not, generally speaking, say the location of the reroute.\n\nI don't want to manually check the COTA website every day; I want to receive notifications in the tools that I habitually use. So I wrote this scraper to make an RSS feed.\n\n## Common issues\n\nGitHub serves the RSS feed with the incorrect [`Content-Type` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) of `text/html`. If this causes problems for your feedreader, consult your feedreader's documentation. FreshRSS supports adding a `#force_feed` to the end of the feed URL to force the software to interpret the file as `application/rss+xml`.\n\n## How \u0026 Credits\n\nThis project scrapes and archives the contents of the \"Alerts\" box which is intermittently present in the header of COTA.com. [COTA.com is a Gatsby app](https://whatcms.org/?s=cota.com), and that header is baked in directly. While examining the site's source code one day, I discovered a reference to the WordPress site which powers the Gatsby app. From there, I examined the read-only side of its WP-JSON API, and discovered that the \"Alerts\" box appears to be powered by the Advanced Custom Fields plugin for WordPress. So rather than scraping the COTA.com Gatsby app directly, I check the ACF endpoint to see if there's a new Alert posted.\n\nhttps://github.com/benlk/cota-reroute-pdf-rss/blob/11a931909553c71107970c0f0490ff7a64b9f323/scraper.bash#L3\n\nThe alert gets saved as JSON to a temporary `build/` directory. I then use [a PHP script](https://github.com/benlk/cota-reroute-pdf-rss/blob/main/parser.php) to parse the JSON file and add any _new_ alerts to [a CSV file](https://github.com/benlk/cota-reroute-pdf-rss/blob/main/alerts-log.csv) listing all historical alerts. \n\nhttps://github.com/benlk/cota-reroute-pdf-rss/blob/11a931909553c71107970c0f0490ff7a64b9f323/parser.php#L79-L89\n\nThen with [a different PHP script](https://github.com/benlk/cota-reroute-pdf-rss/blob/main/rss.php) I convert that CSV to the RSS feed.\n\nIf the current alert's PDF URL isn't already in the CSV, the new line in the CSV results in a change to the RSS feed, and those changes result in a committable diff in Git. The GitHub Action which runs this scraper then commits the change to the main branch, which results in the updated RSS file becoming available at https://raw.githubusercontent.com/benlk/cota-reroute-pdf-rss/main/rss.xml\n\nhttps://github.com/benlk/cota-reroute-pdf-rss/blob/11a931909553c71107970c0f0490ff7a64b9f323/.github/workflows/parse-and-generate.yml#L37-L44\n\nThis project uses [GitHub Actions](https://docs.github.com/en/actions) [à la Simon Willison](https://simonwillison.net/2021/Mar/5/git-scraping/) to perform the scrape,. The process of writing this was greatly aided by [Lasse Benninga's blog post on GitHub Actions scrapers](https://medium.com/@lassebenninga/setup-free-webscraping-in-less-than-5-minutes-using-github-actions-330e1151fbea), which simplifies and expands on Simon Willison's model.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenlk%2Fcota-reroute-pdf-rss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenlk%2Fcota-reroute-pdf-rss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenlk%2Fcota-reroute-pdf-rss/lists"}