Skip to content

Commit 7795a06

Browse files
MakaopiorMazov Sergey
and
Mazov Sergey
authored
Added AppleBot User-Agent (#64)
Co-authored-by: Mazov Sergey <[email protected]>
1 parent 3452a53 commit 7795a06

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/MyCSharp.HttpUserAgentParser/HttpUserAgentStatics.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ public static readonly (string Key, string Value)[] Robots =
277277
( "Barkrowler", "Barkrowler" ),
278278
( "BrightEdge", "BrightEdge" ),
279279
( "ImagesiftBot", "ImagesiftBot" ),
280-
( "Cotoyogi", "Cotoyogi" )
280+
( "Cotoyogi", "Cotoyogi" ),
281+
( "Applebot", "Applebot" )
281282
];
282283

283284
/// <summary>

tests/MyCSharp.HttpUserAgentParser.UnitTests/HttpUserAgentParserTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ public void BrowserTests(string ua, string name, string version, string platform
153153
[InlineData("BrightEdge Crawler/1.0 ([email protected])", "BrightEdge")]
154154
[InlineData("Mozilla/5.0 (compatible; ImagesiftBot; +imagesift.com)", "ImagesiftBot")]
155155
[InlineData("Mozilla/5.0 (compatible; Cotoyogi/4.0; +https://ds.rois.ac.jp/center8/crawler/)", "Cotoyogi")]
156+
[InlineData("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)", "Applebot")]
156157
public void BotTests(string ua, string name)
157158
{
158159
HttpUserAgentInformation uaInfo = HttpUserAgentInformation.Parse(ua);

0 commit comments

Comments
 (0)