{"id":19756061,"url":"https://github.com/luistar/crawling-scraping-examples","last_synced_at":"2025-07-16T16:33:36.184Z","repository":{"id":168538802,"uuid":"644264498","full_name":"luistar/crawling-scraping-examples","owner":"luistar","description":"Python code for simple web crawlers/scrapers","archived":false,"fork":false,"pushed_at":"2023-05-23T13:41:44.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T09:10:40.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/luistar.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-05-23T06:57:11.000Z","updated_at":"2023-05-23T13:41:49.000Z","dependencies_parsed_at":"2023-08-16T22:46:28.366Z","dependency_job_id":null,"html_url":"https://github.com/luistar/crawling-scraping-examples","commit_stats":null,"previous_names":["luistar/crawling-scraping-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/luistar/crawling-scraping-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luistar%2Fcrawling-scraping-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luistar%2Fcrawling-scraping-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luistar%2Fcrawling-scraping-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luistar%2Fcrawling-scraping-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luistar","download_url":"https://codeload.github.com/luistar/crawling-scraping-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luistar%2Fcrawling-scraping-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265524700,"owners_count":23782026,"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":[],"created_at":"2024-11-12T03:14:37.779Z","updated_at":"2025-07-16T16:33:36.172Z","avatar_url":"https://github.com/luistar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Crawling Examples\n\nThis repository contains some crawling/scraping examples in Python. \nPrerequisites: create a virtual environment and install the requirements in requirements.txt.\n\n## Web Crawling from scratch\nThis example includes a simple crawler written from scratch.\nThe crawler uses BeautifulSoup to parse web pages, and supports basic enforcements of \n`robots.txt` files. The crawler starts from a set of user-provided seed urls, \nand visits all links in a breadth-first fashion.\nEach visited web page is saved in `crawler-scratch/output/` as an html file.\nTo start the crawler, run `crawler-scratch/crawler.py`. \n\n## Web Scraping from scratch\nThis example includes a simple scraper written from scratch, to extract talks data from \nhttps://luistar.github.io/talks/.\nThe scraper extends the Crawler of the previous example, supports basic pagination, and \nsaves title and url of each talk in a csv file in `scraper-scratch/output`.\nTo start the scraper, run `scraper-scratch/scraper.py`. \n\n## Crawling and Scraping with Scrapy\nThe above examples have also been implemented using the well-known \n[Scrapy](https://scrapy.org) Python library.\n\n### Web Crawling with Scrapy\nThe code for the Crawling example with Scrapy is in `crawler-scraper-scrapy/crawler/spiders/crawler.py`.\nTo start a crawl, move \nwith a terminal to the `crawler-scraper-scrapy` directory, and run the command: `scrapy crawl crawler`.\nEach visited page is saved as an html file.\nDon't forget to change the path to the desired output directory in `crawler-scrapy/crawler/spiders/fetch_data.py`.\n\n### Web Scraping with Scrapy\nThe code for the Scraping example with Scrapy is in `crawler-scraper-scrapy/crawler/spiders/talks_scraper.py`\nTo start the scraping, move with a terminal to the `crawler-scraper-scrapy` directory, \nand run the command:\n`scrapy crawl talks_scraper -O output/talks.json`. Output will be saved to the `talks.json`\nfile in the `crawler-scraper-scrapy/output/` directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluistar%2Fcrawling-scraping-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluistar%2Fcrawling-scraping-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluistar%2Fcrawling-scraping-examples/lists"}