-
Notifications
You must be signed in to change notification settings - Fork 154
Is there any way to get channel videos by channel id? #56
Comments
Hi there @Wiper-R ! Presently there is not. |
Thanks! |
Yes there is. for example: |
@grubeli, I'm aware about it (even in JSON not just XML), but main problem I'm having is time. I have other projects which have more importance right now. Thanks for letting us aware though. |
I'll see what I can do soon. I'll add a new |
I mean outside of this project, if @Wiper-R is working on some project, they can use direct way for now |
Is there a way to get JSON directly instead of XML? |
@kaisuto import requests
import json
requestPayload = {
"context": {
"client": {
"clientName": "WEB",
"clientVersion": "2.20210224.06.00",
"newVisitorCookie": True,
},
"user": {
"lockedSafetyMode": False,
}
},
"query": "top 10",
"params": "EgZzZWFyY2g%3D",
"browseId": "UC0raGe2owvmadTf85xL_ytw"
}
userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'
data = json.dumps(requestPayload).encode("utf_8")
headers = {
"User-Agent": userAgent
}
r = requests.post(
"https://www.youtube.com/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8",
headers=headers,
data=data
)
#print(r)
#print(r.text)
print(r.json()) You can make a PR if you want, else I will take care for it. |
Hi @mytja , |
No description provided.
The text was updated successfully, but these errors were encountered: