{"id":24399570,"url":"https://github.com/gplumb/netcrawlerdetect","last_synced_at":"2025-04-11T18:41:29.005Z","repository":{"id":56999977,"uuid":"119562186","full_name":"gplumb/NetCrawlerDetect","owner":"gplumb","description":"A .net standard port of JayBizzle's CrawlerDetect project (https://github.com/JayBizzle/Crawler-Detect).","archived":false,"fork":false,"pushed_at":"2023-02-04T16:48:52.000Z","size":2798,"stargazers_count":20,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T14:39:04.593Z","etag":null,"topics":["bots","c-sharp","crawler","detect","dotnet-core","dotnet-standard","spider","user-agent"],"latest_commit_sha":null,"homepage":null,"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/gplumb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-30T16:23:28.000Z","updated_at":"2024-08-06T12:38:52.000Z","dependencies_parsed_at":"2023-02-18T18:01:18.311Z","dependency_job_id":null,"html_url":"https://github.com/gplumb/NetCrawlerDetect","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gplumb%2FNetCrawlerDetect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gplumb%2FNetCrawlerDetect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gplumb%2FNetCrawlerDetect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gplumb%2FNetCrawlerDetect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gplumb","download_url":"https://codeload.github.com/gplumb/NetCrawlerDetect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248460693,"owners_count":21107540,"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":["bots","c-sharp","crawler","detect","dotnet-core","dotnet-standard","spider","user-agent"],"created_at":"2025-01-19T23:35:42.467Z","updated_at":"2025-04-11T18:41:28.977Z","avatar_url":"https://github.com/gplumb.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetCrawlerDetect \u0026nbsp;[![Build Status](https://travis-ci.org/gplumb/NetCrawlerDetect.svg?branch=master)](https://travis-ci.org/gplumb/NetCrawlerDetect)\nA .net standard port of JayBizzle's CrawlerDetect project: [https://github.com/JayBizzle/Crawler-Detect](https://github.com/JayBizzle/Crawler-Detect).\n\n## About NetCrawlerDetect\n\nNetCrawlerDetect is a .net standard class for detecting bots/crawlers/spiders via the user agent and/or http \"from\" header. Currently able to detect 1,000s of bots/spiders/crawlers.\n\n### Installation\nThe easiest way to get started is to add the nuget package `NetCrawlerDetect` (see [here](https://www.nuget.org/packages/NetCrawlerDetect)).\n\nFor those who don't want to use nuget, feel free to clone this repo and copy `CrawlerDetect.cs` and the `Fixtures` folder into your project directly.\n\n### Usage\nLike its' originator, you can either pass in a collection of web headers (from which the user agent will be extracted) or pass in the user agent string directly.\n\nThe simplest use of this object is as follows:\n\n```csharp\n// Pass in the user agent directly\nvar detector = new CrawlerDetect();\nvar result = detector.IsCrawler(\"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)\");\n\n// Do we have a bot/crawler/spider?\nif(result == true)\n{\n    // Yes. Fetch the name of the bot (optional)\n    var bot = detector.Matches[0].Value;\n}\n```\n\n### Contributing\nIf you find a bot/spider/crawler user agent that NetCrawlerDetect fails to detect, please submit a pull request with the regex pattern added to the `_data` List in `Fixtures/Crawlers.cs` and add the failing user agent to `NetCrawlerDetect.Tests/crawlers.txt`.\n\nPlease also consider submitting a pull request to our parent project :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgplumb%2Fnetcrawlerdetect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgplumb%2Fnetcrawlerdetect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgplumb%2Fnetcrawlerdetect/lists"}