Comments (10)
Hi
It can search the videos in channel with API
/youtubei/v1/browse?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8
with browseID
as channelID and query
as keyword
Set params
as EgZzZWFyY2g%3D
Just like this
Also get the videos in channel by set params
as EgZ2aWRlb3M%3D
, like this
The response will be a big json which contains videos information.
from youtube-search-python.
Hi @mytja ,
I want to do this for a while, but I'm busy at work.
If you can take care for it, that will be great!!
Thanks!
from youtube-search-python.
Hi there @Wiper-R !
Presently there is not.
from youtube-search-python.
I mean outside of this project, if @Wiper-R is working on some project, they can use direct way for now
from youtube-search-python.
Is there a way to get JSON directly instead of XML?
from youtube-search-python.
@kaisuto
Thank you so much for your time.
I can confirm it working using this sample:
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.
Again thanks for your time and for your solution
from youtube-search-python.
Thanks!
from youtube-search-python.
Yes there is.
https://www.youtube.com/feeds/videos.xml?channel_id={ID}
for example: https://www.youtube.com/feeds/videos.xml?channel_id=UCoRR6OLuIZ2-5VxtnQIaN2w
returns NFrealmusic
videos in XML format, you can parse them
from youtube-search-python.
@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.
from youtube-search-python.
I'll see what I can do soon. I'll add a new Channel
class like Video
& Playlist
.
from youtube-search-python.
Related Issues (20)
- [Feature request] youtube music search HOT 1
- Age-restricted videos not deciphering in StreamURLFetcher HOT 2
- Retrieve channel info & search with a specific time span HOT 8
- Search for videos with multiple hashtags HOT 1
- Errors on Video.getInfo HOT 2
- Issues with fetching age-restricted videos
- Filter livestreams HOT 5
- Total views of a channel HOT 2
- about video information retrieved, miss "how many likes/dislike" properties HOT 1
- [Feature Request] get list of Playlists created by a user HOT 1
- ChannelSearch not working on "* - topic" channels
- got repeted result in playlist HOT 3
- Passing cookies to requests
- Different calls to Comments.get keeps comments from previous calls HOT 1
- Transcriptions are blank HOT 2
- error when getting videos from channel id HOT 2
- Title and desc HOT 1
- Include like count for video info HOT 2
- Questions rather than issue: how to add some values to the result? HOT 2
- An important anouncement about this library HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-search-python.