{"id":37049317,"url":"https://github.com/alexleen/scrape-x","last_synced_at":"2026-01-14T05:44:07.675Z","repository":{"id":218269399,"uuid":"139599720","full_name":"alexleen/scrape-x","owner":"alexleen","description":"Simple .NET library that provides generic web scraping abilities using XPaths.","archived":false,"fork":false,"pushed_at":"2019-01-02T04:04:30.000Z","size":573,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T05:42:38.496Z","etag":null,"topics":["chsarp","dotnet","dotnetstandard","scraper","scraping","scraping-websites"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexleen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-07-03T14:59:11.000Z","updated_at":"2022-06-03T01:59:22.000Z","dependencies_parsed_at":"2024-01-20T21:26:55.309Z","dependency_job_id":"397eb63c-d511-48e9-9075-7ae531462766","html_url":"https://github.com/alexleen/scrape-x","commit_stats":null,"previous_names":["alexleen/scrape-x"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alexleen/scrape-x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexleen%2Fscrape-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexleen%2Fscrape-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexleen%2Fscrape-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexleen%2Fscrape-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexleen","download_url":"https://codeload.github.com/alexleen/scrape-x/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexleen%2Fscrape-x/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28411248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chsarp","dotnet","dotnetstandard","scraper","scraping","scraping-websites"],"created_at":"2026-01-14T05:44:04.883Z","updated_at":"2026-01-14T05:44:07.659Z","avatar_url":"https://github.com/alexleen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scrape-x\n[![Build status](https://ci.appveyor.com/api/projects/status/hm4fyghc1gtuxequ/branch/master?svg=true)](https://ci.appveyor.com/project/alexleen/scrape-x/branch/master)\n[![](https://sonarcloud.io/api/project_badges/measure?project=alexleen_scrape-x\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=alexleen_scrape-x)\n[![](https://sonarcloud.io/api/project_badges/measure?project=alexleen_scrape-x\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=alexleen_scrape-x)\n[![nuget](https://img.shields.io/nuget/v/ScrapeX.svg)](https://www.nuget.org/packages/ScrapeX/)\n\nSimple .NET library that provides generic web scraping abilities using XPaths.\n\nBasic features:\n- Fluent interface\n- Pagination\n- Throttling\n- [HttpClient](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netframework-4.7.2) injection\n## Wiki\nFor how-to's, examples, and documentation, please see [the wiki](https://github.com/alexleen/scrape-x/wiki).\n## Example Usage\n```cs\nprivate static void Main(string[] args)\n{\n    IScraperFactory scraperFactory = new ScraperFactory();\n\n    //Set up a new scraper to scrape Austin's craigslist\n    IPaginatingScraper scraper = scraperFactory.CreatePaginatingScraper(\"https://austin.craigslist.org\");\n\n    //Set the URL for the results page. In this case, \"apts/housing for rent\".\n    scraper.SetResultsStartPage(\"/search/apa\")\n    \n           //Set the XPath for search result nodes\n           .SetIndividualResultNodeXPath(\"//*[@id=\\\"sortable-results\\\"]/ul/li\")\n           \n           //Sets the XPath for search result links relative to result node\n           .SetIndividualResultLinkXPath(\"a/@href\")\n           \n           //Sets a predicate that decides whether or not an individual result should be visited or not.\n           //In this case, results are only visited if their \"housing\" span contains \"1br\".\n           //This saves considerable bandwidth.\n           .SetResultVisitPredicate(housing =\u003e housing.Contains(\"1br\"), \"p/span[2]/span[2]\")\n           \n           //Sets \"Next\" button link XPath\n           .SetNextLinkXPath(\"//*[@id=\\\"searchform\\\"]/div[3]/div[3]/span[2]/a[3]/@href\")\n           \n           //Sets XPaths used for retrieving data from the target page.\n           //Keys are used to identify the data in the callback to the Go method.\n           .SetTargetPageXPaths(new Dictionary\u003cstring, string\u003e\n           {\n               { \"latitude\", \"//*[@id=\\\"map\\\"]/@data-latitude\" },\n               { \"longitude\", \"//*[@id=\\\"map\\\"]/@data-longitude\" },\n               { \"price\", \"/html/body/section/section/h2/span[2]/span[1]\" },\n               { \"br\", \"/html/body/section/section/section/div[1]/p[1]/span[1]/b[1]\" },\n               { \"sqft\", \"/html/body/section/section/section/div[1]/p[1]/span[2]/b\" }\n           })\n           \n           //Go!\n           //Everytime a target page is scraped this callback is called.\n           .Go(OnResultRetrieved);\n}\n\nprivate static void OnResultRetrieved(string link, IDictionary\u003cstring, string\u003e results)\n{\n    //Do something with the results...\n    Console.WriteLine(results[\"br\"]);\n}\n```\n## Thanks!\n[JetBrains Rider](https://www.jetbrains.com/rider/)  \n[AppVeyor](https://ci.appveyor.com/)  \n[HtmlAgilityPack](https://html-agility-pack.net/)  \n[SonarCloud](https://sonarcloud.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexleen%2Fscrape-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexleen%2Fscrape-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexleen%2Fscrape-x/lists"}