Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After YouTube update nothing works #16

Open
Ivolution-dev opened this issue Nov 1, 2022 · 10 comments
Open

After YouTube update nothing works #16

Ivolution-dev opened this issue Nov 1, 2022 · 10 comments

Comments

@Ivolution-dev
Copy link

After the lastest update i can't get videos from a channel

video_generator = scrapetube.get_channel(channel_id=channel_id, limit=5, sort_by="newest")

The generator gives an empty array

@gsturov
Copy link

gsturov commented Nov 2, 2022

Stopped working for me too.

@Ivolution-dev
Copy link
Author

Yes I programmed my own now.

@Overkoat
Copy link

Overkoat commented Nov 3, 2022

@Ivolution-dev What was the problem?

@atknin
Copy link

atknin commented Nov 3, 2022

Not working

@dermasmid
Copy link
Owner

i pushed a fix, but i saw that some of the other stuff like sorting does not work anymore, ill try to fix it on the weekend

@danielsauceda
Copy link

danielsauceda commented Nov 3, 2022

Alright everyone I have a fix for you. @dermasmid you can use my fix to help yourself
they just made changes to the JSON structure

First of all in the source code this change needs to be added
in the scrapetube file C:\ProgramData\Anaconda3\envs\py38\lib\site-packages\scrapetube\scrapetube.py

def get_channel( )
    ...
    ....
    # videos = get_videos(url, api_endpoint, "gridVideoRenderer", limit, sleep)
    videos = get_videos(url, api_endpoint, "richItemRenderer", limit, sleep)

Howerver this changes the output path of the dict so you have to do it this way

for vid in videos:

    # print("https://www.youtube.com/watch?v=" + str(vid['videoId']))
    print("https://www.youtube.com/watch?v=" + str(vid['content']['videoRenderer']['videoId']))

I'm sure in the source code you could squish down the results dict so it repoints to to just videoId .... but this worked for me

@Ivolution-dev this is a short fix. hope it helps

edit: if no one upvotes I'm going to tell on you Majj

@SurajBhari
Copy link
Contributor

Is it expected behaviour that it only returns "videos" and not livestreams ? @danielsauceda ??

@parafoxia
Copy link

Live streams are on a different tab on the website, so they would need a separate endpoint.

@zoreu
Copy link

zoreu commented Nov 11, 2022

Nothing until now?

@gsturov
Copy link

gsturov commented Nov 11, 2022

We definitely need live streams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants