{"id":32649152,"url":"https://github.com/tomviner/scrape-tory-nominations","last_synced_at":"2026-06-25T01:32:08.991Z","repository":{"id":61794232,"uuid":"555079078","full_name":"tomviner/scrape-tory-nominations","owner":"tomviner","description":"A scraper that records various listings of declared Conservative nominations for leadership candidates","archived":false,"fork":false,"pushed_at":"2022-11-14T23:31:13.000Z","size":2157,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-15T01:20:00.069Z","etag":null,"topics":["git-scraping","politics"],"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/tomviner.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}},"created_at":"2022-10-20T23:08:13.000Z","updated_at":"2023-01-12T22:24:29.000Z","dependencies_parsed_at":"2023-01-21T16:45:20.269Z","dependency_job_id":null,"html_url":"https://github.com/tomviner/scrape-tory-nominations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomviner/scrape-tory-nominations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomviner%2Fscrape-tory-nominations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomviner%2Fscrape-tory-nominations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomviner%2Fscrape-tory-nominations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomviner%2Fscrape-tory-nominations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomviner","download_url":"https://codeload.github.com/tomviner/scrape-tory-nominations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomviner%2Fscrape-tory-nominations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281946316,"owners_count":26587973,"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","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"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":["git-scraping","politics"],"created_at":"2025-10-31T06:52:19.235Z","updated_at":"2025-10-31T06:52:21.272Z","avatar_url":"https://github.com/tomviner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tory nomination scraper\n\nA [git scraper](https://simonwillison.net/2020/Oct/9/git-scraping/) that records various spreadsheets containing listings of declared Conservative nominations for leadership candidates, so changes are visible.\n\n![image](https://github.com/tomviner/scrape-tory-nominations/blob/main/joint-time-series.png?raw=true)\n\n## Data sources:\n- Guido Fawkes [Tory Leadership: Who's Backing Who October Election](https://docs.google.com/spreadsheets/d/1PRufWhh2YAoxPUJEXeVaEOe7rcT1IINOXijeLI6o9Cc/htmlview)\n\nLatest:\n\u003c!-- [[[cog\nimport cog\nfrom headline_numbers import make_table\ntable = make_table('gf-noms-time-series.csv')\ncog.out(table)\n]]] --\u003e\n|                 |   Rishi Sunak | Boris Johnson   |   Penny Mordaunt |\n|---------------------|---------------|-----------------|------------------|\n| 2022-10-24 12:52:01 |           202 |                 |               30 |\n\u003c!-- [[[end]]] --\u003e\n\n![image](https://github.com/tomviner/scrape-tory-nominations/blob/main/gf-noms-time-series.png?raw=true)\n\n\n- [Smarkets Conservative leadership election tracker (October 2022)](https://docs.google.com/spreadsheets/d/1t1MaeGTmOvmOOkUL8TDDJwqTTc-N1wmRxPeRe0k3yjM/htmlview)\n\nLatest: \u003c!-- [[[cog\nimport cog\nfrom headline_numbers import make_table\ntable = make_table('smarkets-leaderboard-time-series.csv')\ncog.out(table)\n]]] --\u003e\n|                 |   Rishi Sunak |   Boris Johnson |   Penny Mordaunt |\n|---------------------|---------------|-----------------|------------------|\n| 2022-10-24 11:50:47 |           185 |              47 |               29 |\n\u003c!-- [[[end]]] --\u003e\n\n![image](https://github.com/tomviner/scrape-tory-nominations/raw/main/smarkets-leaderboard-time-series.png?raw=true)\n\n\n## Workflow\n- download spreadsheet as csv\n- convert to sqlite db with [git-history](https://pypi.org/project/git-history/) (see this repos requirement.txt to include https://github.com/simonw/git-history/pull/59)\n- query db using [sqlite-utils](https://pypi.org/project/sqlite-utils/) to export time series\n- generate graph\n- inject latest total to the README with [cog](https://pypi.org/project/cogapp/) content generator\n\nAttempts exports as CSV every 5 minutes, although Github actions seems to run less often than this.\n\nInspired by [Simon Willison](https://twitter.com/simonw/)'s [Half Moon Bay Pumpkin Festival scraper](https://github.com/simonw/scrape-hmb-traffic).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomviner%2Fscrape-tory-nominations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomviner%2Fscrape-tory-nominations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomviner%2Fscrape-tory-nominations/lists"}