I am confused that the YouTube API used in this url I want to test that it is valid know and I mean end points of this url is not changed over the youtube but I am not sure which type of API is used in this API request:
# Send API request to increment views
session.get(f"https://s.youtube.com/api/stats/watchtime?ns=yt&el=detailpage&cpn=Syr16u8qwHnPkVqI&docid={token}&ver=2&cmt=7334&ei={ei}&fmt=133&fs=0&rt=1003&of={of}&euri&lact=4418&live=dvr&cl={cl}&state=playing&vm={vm}&volume=100&c=MWEB&cver=2.20200313.03.00&cplayer=UNIPLAYER&cbrand=apple&cbr=Safari%20Mobile&cbrver=12.1.15E148&cmodel=iphone&cos=iPhone&cosver=12_2&cplatform=MOBILE&delay=5&hl=ru&cr=GB&rtn=1303&afmt=140&lio=1556394045.182&idpj=&ldpj=&rti=1003&muted=0&st=7334&et=7634",
headers={'Referer': base_url}, proxies=proxy)
If any one can tell me form where I can test it
# Send API request to increment views
session.get(f"https://s.youtube.com/api/stats/watchtime?ns=yt&el=detailpage&cpn=Syr16u8qwHnPkVqI&docid={token}&ver=2&cmt=7334&ei={ei}&fmt=133&fs=0&rt=1003&of={of}&euri&lact=4418&live=dvr&cl={cl}&state=playing&vm={vm}&volume=100&c=MWEB&cver=2.20200313.03.00&cplayer=UNIPLAYER&cbrand=apple&cbr=Safari%20Mobile&cbrver=12.1.15E148&cmodel=iphone&cos=iPhone&cosver=12_2&cplatform=MOBILE&delay=5&hl=ru&cr=GB&rtn=1303&afmt=140&lio=1556394045.182&idpj=&ldpj=&rti=1003&muted=0&st=7334&et=7634",
headers={'Referer': base_url}, proxies=proxy)
You should be able to do a http request in python using the following
But I don't think It is a good idea to try and fake youtube watchtime with this method. youtube Calculates a bunch of things when it calculates the view time to make sure that the views are real. this is why youtube view bots generally have to go to use selenium to control a real browser instance. try looking here for youtube view bots: https://github.com/topics/youtube-view-bot