Git Product home page Git Product logo

Comments (10)

kaisuto avatar kaisuto commented on June 25, 2024 4

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
image

Also get the videos in channel by set params as EgZ2aWRlb3M%3D, like this
image

The response will be a big json which contains videos information.

from youtube-search-python.

kaisuto avatar kaisuto commented on June 25, 2024 2

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.

alexmercerind avatar alexmercerind commented on June 25, 2024 1

Hi there @Wiper-R !

Presently there is not.

from youtube-search-python.

 avatar commented on June 25, 2024 1

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.

 avatar commented on June 25, 2024 1

Is there a way to get JSON directly instead of XML?

from youtube-search-python.

mytja avatar mytja commented on June 25, 2024 1

@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.

Wiper-R avatar Wiper-R commented on June 25, 2024

Thanks!

from youtube-search-python.

 avatar commented on June 25, 2024

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.

alexmercerind avatar alexmercerind commented on June 25, 2024

@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.

alexmercerind avatar alexmercerind commented on June 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.