zerodytrash / youtube-internal-clients Goto Github PK
View Code? Open in Web Editor NEWA python script that discovers hidden YouTube API clients. Just a research project.
A python script that discovers hidden YouTube API clients. Just a research project.
Why there's no m4a formats like youtube-dl does?
Please tell me what am I doing wrong? My links only work for 20 seconds, and they should work for 6 hours. Or shouldn't they?
Here is my script PHP
$ytid = 'XqgYj8atJqo';
$data = '{"contentCheckOk": true,"context": {"client": {"androidSdkVersion": 31,"clientName": "ANDROID","clientVersion": "17.36.4", "gl": "EN","hl": "en","osName": "Android","osVersion": "12", "platform": "MOBILE"}, "user": {"lockedSafetyMode": false },},"racyCheckOk": true,"videoId": "'.$ytid.'"}';
$heder = array('Host: www.youtube.com','Content-Type: application/json','User-Agent: com.google.android.youtube/17.36.4 (Linux; U; Android 12; GB) gzip','Origin: https://www.youtube.com','Referer: https://www.youtube.com/','Accept-Language: en-EN,en;q=0.8,en-US;q=0.5,en;q=0.3','X-Youtube-Client-Name: 3');
$ch = curl_init('https://www.youtube.com/youtubei/v1/player?key=AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w');
curl_setopt($ch, CURLOPT_HTTPHEADER, $heder);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, false);
$json = json_decode(curl_exec($ch), true);
curl_close($ch);
echo '<pre>'.print_r($json, true).'</pre>';
import requests
url = "https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
headers = {
"Host": "www.youtube.com",
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.42",
"Accept": "/",
"Origin": "https://www.youtube.com",
"Referer": "https://www.youtube.com/",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "de,de-DE;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"
}
data = {
"context": {
"client": {
"hl": "en",
"gl": "US",
"clientName": "WEB",
"clientVersion": "2.20220916.00.00",
"clientScreen": "WATCH",
"androidSdkVersion": 31
},
"thirdParty": {
"embedUrl": "https://www.youtube.com/"
}
},
"videoId": "yvyAQiiKIN8",
"playbackContext": {
"contentPlaybackContext": {
"signatureTimestamp": 19250
}
},
"racyCheckOk": True,
"contentCheckOk": True,
"videoDebugInfo": {
"enableVideoStatsMonitor": True,
"enableVideoPlayStatsMonitor": True
}
}
response = requests.post(url, json=data, headers=headers)
json_data = response.json()
I was looking for these values in the response but couldn't find them, can you help me
{
"ns": "yt",
"el": "detailpage",
"cpn": "QYNyEzZ92lgFPcuY",
"ver": 2,
"cmt": "46849.276",
"fmt": "243",
"fs": "0",
"rt": "3544.515",
"euri": "",
"lact": 0,
"live": "dvr",
"cl": "540057686",
"mos": 1,
"state": "8",
"volume": 100,
"cbr": "Chrome",
"cbrver": "114.0.0.0",
"c": "WEB",
"cver": "2.20230615.02.01",
"cplayer": "UNIPLAYER",
"cos": "Windows",
"cosver": "10.0",
"cplatform": "DESKTOP",
"delay": 5,
"hl": "en_US",
"cr": "ID",
"fexp": "23983296,23986017,24004644,24007246,24080738,24135310,24208765,24362631,24363114,24364789,24366065,24366917,24369773,24371398,24373193,24379215,24380264,24383852,24385288,24415864,24433679,24439361,24470718,24486562,24532855,24550458,24550951,24559328,24699899,39323074",
"afmt": "140",
"lio": "1687141757.701",
"muted": "1",
"cc": ".en.eEY6OEpapPo",
"docid": "3Wmxa-lMpkI",
"ei": "Y3SQZPiZDvONvcAP5aW9wAQ",
"plid": "AAX-fTPvyP9nQNxA",
"of": "29JfWt3VWi3ZrjViFB0SRg",
"vm": "CAEQABgEOjJBQ00wQ1lnZnFkRVU1eVAxR2p1eFV1RTVLSWVkc0NmcmdaMW5Ed1E2QnlLdjByc05yd2JOQVBta0tESWxIckZpVzFuWmk3Q2tKM2g5cnp2RFV1VVJQSFVyRHRTSTYzTFBiT3oxbzZTaWwzclVGYmw4Z3ZxZUE1MzN3SHZYeUpJd3l3aAE",
"vct": "46849.276",
"vd": "50400.106",
"vpl": "46800.106-46849.276",
"vbu": "46800.006-46970.000",
"vpa": "0",
"vsk": "0",
"ven": "0",
"vpr": "1",
"vrs": "4",
"vns": "2",
"vec": "null",
"vemsg": "",
"vvol": "1",
"vdom": "1",
"vsrc": "1",
"vw": "731",
"vh": "548",
"lct": "46849.176",
"lsk": false,
"lmf": false,
"lbw": "437484.301",
"lhd": "0.216",
"lst": "0.000",
"laa": "itag_140_type_3_src_updateWithSegmentInfo_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_82199_end_1",
"lva": "itag_243_type_3_src_updateWithSegmentInfo_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_21930_end_1",
"lar": "itag_140_type_3_src_mlLiveCreateReqInfoForSeg_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_90000_end_1",
"lvr": "itag_243_type_3_src_mlLiveCreateReqInfoForSeg_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_148000_end_1",
"laq": "0",
"lvq": "0",
"lab": "46800.006-46970.022",
"lvb": "46800.000-46970.000",
"ismb": 2970000,
"latency_class": "NORMAL",
"segduration": 5,
"lat": 1687188608,
"relative_loudness": "NaN",
"optimal_format": "360p",
"user_qual": 0,
"release_version": "youtube.player.web_20230613_01_RC00",
"debug_videoId": "3Wmxa-lMpkI",
"0sz": "false",
"op": "",
"yof": "false",
"dis": "",
"debug_playbackQuality": "medium",
}
Hi all,
The TVHTML5_SIMPLY_EMBEDDED_PLAYER client since yesterday always responds 403 to all requests.
As a result it would seem to be deprecated.
Are you experiencing the same problem?
Regards,
R
It was discovered that the ANDROID client will require a new parameter in order to return correct streams URLs, see: TeamNewPipe/NewPipe#8713
Should we add that parameter in the results of the README: https://github.com/zerodytrash/YouTube-Internal-Clients#results?
Hi , Can you provide me the API key and API link Used here , I am developing a web application to hear music . So ,if u provide me that it will be usefull for me
TVHTML5
(and formats derived from it, i.e. TVHTML5_VR
, TVHTML5_SIMPLY
TVHTML5_SIMPLY_EMBEDDED_PLAYER
, etc.) contain duplicate audio itags with isDrc
/drc=1
on some videos (e.g. xAaxZwAKgTI
, Tq92D6wQ1mg
, and some other "non-song" videos?)
credits to @selfisekai for also independently finding this out, and specifically how it affects TVHTML5
and related clients
It can be a very hot topic if there is a proper documentation explaining the proper methodology working behind the scenes. If you guy's plan for it, I would be most likely to contribute. Thank you it's really a awesome try.
please Add more info about using of "WEB_MUSIC" in readme.md
404 Not Found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.