{"id":22515082,"url":"https://github.com/rggh/scrapy19","last_synced_at":"2026-04-20T10:32:01.207Z","repository":{"id":121737175,"uuid":"371671834","full_name":"RGGH/Scrapy19","owner":"RGGH","description":"Scrapy To Postgresql for ML / NLP","archived":false,"fork":false,"pushed_at":"2021-06-08T19:19:51.000Z","size":1518,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T01:55:27.835Z","etag":null,"topics":["bs4","postgresql","python","scrapy","webscraping"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/RGGH.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-05-28T11:00:30.000Z","updated_at":"2022-03-13T02:21:17.000Z","dependencies_parsed_at":"2023-03-13T12:25:08.895Z","dependency_job_id":null,"html_url":"https://github.com/RGGH/Scrapy19","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RGGH/Scrapy19","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2FScrapy19","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2FScrapy19/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2FScrapy19/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2FScrapy19/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RGGH","download_url":"https://codeload.github.com/RGGH/Scrapy19/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2FScrapy19/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32042996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["bs4","postgresql","python","scrapy","webscraping"],"created_at":"2024-12-07T03:28:06.880Z","updated_at":"2026-04-20T10:32:01.187Z","avatar_url":"https://github.com/RGGH.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Scrapy To Postgresql for ML / NLP\n\n### Notes:\n  - Run as 'scrapy crawl' not via crawler process, as pipelines don't work with crawler process\n  - Make sure columns in Postgres have large enough varchar() for long urls\n  - written with Python 3.9.5\n  - If you are coming from MySQL, change port to 5432 !\n  - Keep search small, as the site has 'load more' (not AJAX/JSON) so will not work from scrapy\n\n  - Clone Scrapy19, run in a virtualenv, use cj.sh (Cron Job Shell Script) via cron to run it daily\n\n#### code to age out old records:\n\n    jobs=# DELETE FROM listings\n    WHERE posted \u003c NOW() - interval '7 days';\n    DELETE 0\n    jobs=# DELETE FROM listings\n    WHERE posted \u003c NOW() - interval '5 days';\n    DELETE 0\n    jobs=# DELETE FROM listings\n    WHERE posted \u003c NOW() - interval '4 days';\n    DELETE 10\n    jobs=# \n    \n#### check size of a column:\n\n    jobs=# select\n    sum(pg_column_size(posted)) as total_size,\n    avg(pg_column_size(posted)) as average_size,\n    sum(pg_column_size(posted)) * 100.0 / pg_relation_size('listings') as percentage\n    from listings;\n    total_size |    average_size    |       percentage       \n    -----------+--------------------+------------------------\n           136 | 4.0000000000000000 | 0.23716517857142857143\n\n\n  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frggh%2Fscrapy19","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frggh%2Fscrapy19","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frggh%2Fscrapy19/lists"}