WhichBrowser / Parser-PHP

Browser sniffing gone too far — A useragent parser library for PHP
http://whichbrowser.net
MIT License
1.79k stars 240 forks source link

Update `Pinterest` with more regex as not detecting many combinations and correct app and bot sections (currently mixed up) #609

Closed summercms closed 2 years ago

summercms commented 3 years ago

See github issue: https://github.com/WhichBrowser/Parser-PHP/issues/505

User agent Version OS Hardware Type Popularity
Pinterest/0.2 (+http://www.pinterest.com/) 0.2 -- Server Very common
Mozilla/5.0 (compatible; Pinterestbot/1.0; +http://www.pinterest.com/bot.html)   -- Server Very common
Pinterest/0.2 (+http://www.pinterest.com/bot.html) 0.2 -- Server Common
Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Pinterestbot/1.0; +http://www.pinterest.com/bot.html)   -- Server Average
Pinterest/0.1 +http://pinterest.com/ 0.1 -- Server Average
Pinterest/0.2 (http://www.pinterest.com/) 0.2 -- Server Uncommon
Mozilla/5.0 (compatible; Pinterestbot/1.0; http://www.pinterest.com/bot.html)   -- Server Uncommon
Pinterest for Android/6.46.4 (g2; 4.4.2)   -- Server Uncommon
Pinterest/4.5 CFNetwork/711.3.18 Darwin/14.0.0 4.5 -- Server Uncommon
Pinterest for iOS/6.71 (iPhone9,3; 11.4.1)   -- Server Uncommon
Pinterest for Android/6.37.0 (j7xelte; 6.0.1)   -- Server Uncommon
Pinterest for Android Tablet/7.7.7 (SGP511; 4.4.2) 1   -- Mobile - Tablet Uncommon

Extracting the above data into this repo gives the following:

App section

Pinterest for Android/6.46.4 (g2; 4.4.2)

Pinterest for iOS/6.71 (iPhone9,3; 11.4.1)

Pinterest for Android/6.37.0 (j7xelte; 6.0.1)

Pinterest for Android Tablet/7.7.7 (SGP511; 4.4.2) 1

Bot section

Old UA:

Pinterest/0.2 (+http://www.pinterest.com/)
Pinterest/0.1 +http://pinterest.com/
Pinterest/0.2 (http://www.pinterest.com/)
Pinterest/4.5 CFNetwork/711.3.18 Darwin/14.0.0

New UA:

Pinterest/0.2 (+https://www.pinterest.com/bot.html)

Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Pinterestbot/1.0; +https://www.pinterest.com/bot.html)

Mozilla/5.0 (compatible; Pinterestbot/1.0; http://www.pinterest.com/bot.html)

Link: https://help.pinterest.com/en/business/article/pinterest-crawler

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 71dfd3a07bf064d9e7b8f6d8fc4e74ee1268ea50 on summercms:Pinterest-Bot into bcf642a1891032de16a5ab976fd352753dd7f9a0 on WhichBrowser:master.