JuanBindez/pytubefix

ANDROID / WEB client response

Closed this issue ยท 5 comments

The app i wrote using pytubefix (https://github.com/paichiwo/tube-getter) produces this error:
The ANDROID client did not get a valid response, trying to use the WEB client. Video ID: aQvGIIdgFDM Please open an issue at https://github.com/JuanBindez/pytubefix/issues and provide this log output.

this area of my code is responsible for it:

        url = self.url_entry.get()
        if url:
            try:
                if self.dl_format == 'audio':
                    get_links(url, self.yt_playlist)
                    data = self.get_data_for_treeview(140, 'mp3')
                else:
                    get_links(url, self.yt_playlist)
                    data = self.get_data_for_treeview(22, 'mp4')

It seems like pytubefix throws that error at random but i could be mistaken. However one time when trying to get data for https://www.youtube.com/watch?v=-lN9n7b972o it shows error, another time it doesn't. I also have no idea what the aQvGIIdgFDM stands for and why it says that ANDROID client did not get a valid response if I'm using the app on a PC with WIN 11?

image

  • OS: WINDOWS 11
  • Python Version [3.12]
  • Pytubefix Version [5.1.1]

The video ID: aQvGIIdgFDM leads to the video https://www.youtube.com/watch?v=aQvGIIdgFDM that is a video Youtube pushes when it does not want to deliver the requested (video and/or audio) content. The audio of that video contains 5 minutes of silence, that is what I was getting by random a few weeks ago, but did not got that anymore in recent versions of pytubefix.

You can try using YouTube(url, client='WEB') , but I'll change the 'client' to WEB to avoid confusion

that worked, thank you so much !

try pytubefix==5.1.2rc1, if it's ok let me know

i removed client='WEB' and after updating to 5.1.2rc1 works great, can't see any issues. Thanks