bitbot-irc / bitbot

https://bitbot.dev | Python3 event-driven modular IRCv3 bot 🤖

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All YouTube Music titles report "Your browser is deprecated, please upgrade."

Mikaela opened this issue · comments

I wonder if there is anything that could be done towards that like spoofing user agent or if the website just does something that Bitbot can't support.

22:24:39 <@Mikaela> https://music.youtube.com/watch?v=JgAYqDmsEjY&feature=share
22:24:41 <+bittibotti> [Title] Your browser is deprecated, please upgrade.

Version: BitBot v1.19.0 (develop @ 4fa0524)

please enable the setting auto-youtube.

!config c auto-youtube on

kuva

I seem to be having the same issue and a new one. My first attempt brought nothing to console, the second brought:

└┌(%:~)┌- loka 04 19:39:01 relpda python3[5094]: 2020-10-04T19:39:00.987 [ERROR] failed to call event "received.message.channel"
loka 04 19:39:01 relpda python3[5094]: Traceback (most recent call last):
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/src/EventManager.py", line 203, in _call
loka 04 19:39:01 relpda python3[5094]:     returned = hook.call(event)
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/src/EventManager.py", line 53, in call
loka 04 19:39:01 relpda python3[5094]:     return self.function(event)
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/src/core_modules/commands/__init__.py", line 344, in channel_message
loka 04 19:39:01 relpda python3[5094]:     res = self.command(event["server"], event["channel"],
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/src/core_modules/commands/__init__.py", line 204, in command
loka 04 19:39:01 relpda python3[5094]:     hook.call(new_event)
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/src/EventManager.py", line 53, in call
loka 04 19:39:01 relpda python3[5094]:     return self.function(event)
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/modules/youtube.py", line 188, in channel_message
loka 04 19:39:01 relpda python3[5094]:     out = self._from_url(url)
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/modules/youtube.py", line 107, in _from_url
loka 04 19:39:01 relpda python3[5094]:     return self.video_details(query["v"][0])
loka 04 19:39:01 relpda python3[5094]:   File "/home/bitbot/bitbot/modules/youtube.py", line 39, in video_details
loka 04 19:39:01 relpda python3[5094]:     if page["items"]:
loka 04 19:39:01 relpda python3[5094]: KeyError: 'items'

Version: BitBot v1.20.0 (develop @ 777c14b)

And now it works for youtube.com, but not for music.youtube.com, I guess the module doesn't handle the subdomain?

kuva

Also affects matrix-org/synapse#1859 and I guess when they will fix it, inspiration can be took from there if this will be fixed by changing user-agent rather than in the YouTube module.