ua-parser / uap-core

The regex file necessary to build language ports of Browserscope's user agent parser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request to add TikTok

mckingho opened this issue · comments

I suggest to add TikTok user agent regex to the social part.

@mckingho do you have a candidate pull request with a pattern and test coverage?

@russellwhitaker Yes. I shall submit a PR once I update the tests.

commented

@mckingho I'd like to see this support added as well. any chance that this is close to incorporation or you can share where you were at with it?

@geohci
I do not identity TikTok clients in production at the moment. My findings ends with an example TikTok 16.0.16 rv:103005 (iPhone; iOS 11.1.4; en_EN) Cronet from user-agents.net. I suggest checking TikTok prefix followed by semantic versioning.
But I did not commit anything because I lack sufficient examples. You can take this feature request if you have more information.

commented

@mckingho yes sufficient examples was my concern too. As one example, I navigated to a website URL via TikTok and then checked the user-agent for the browser. For that phone, it gave (hand-copied so excuse any small typos):

Mozilla/5.0 (Linux; Android 10; moto g(7) Build/QP6_S30.52-23-13-4; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.128 Mobile Safari/537.36 musical_ly_2022704050 JsSdk/1.0 NetType/WIFI Channel/googleplay AppName/musical_ly app_version/27.4.5 ByteLocale/en ByteFullLocale/en Region/US Spark/1.2.4-alpha.5 AppVersion/27.4.5 PIA/1.5.10 BytedanceWebview/d8a21c6

From that, I see a few identifying characteristics (BytedanceWebview and AppName/musical_ly probably) but am not sure what to extract from the rest and how stable it is.