botamusique
botamusique copied to clipboard
youtube issues with master git
Describe the bug
youtube search fails when setting cookie_file
[Jun 06 02:10:57 ERROR] bot: command ysearch failed with error: Traceback (most recent call last):
File "/home/bots/botamusique.git/mumbleBot.py", line 347, in message_received
self.cmd_handle[command_exc]['handle'](self, user, text, command_exc, argument)
File "/home/bots/botamusique.git/command.py", line 578, in cmd_yt_search
results = util.youtube_search(parameter)
File "/home/bots/botamusique.git/util.py", line 327, in youtube_search
cookie = parse_cookie_file(cookie_file) if cookie_file else {}
File "/home/bots/botamusique.git/util.py", line 590, in parse_cookie_file
cookies[lineFields[5]] = lineFields[6]
IndexError: list index out of range
Also the option youtube_query_cookie
is not recognized as valid one.
ERROR:root:Unexpected config items '[bot] youtube_query_cookie'
Affected version git master as of today
To Reproduce Steps to reproduce the behavior:
- git clone the repo
- configure the bot and set both options mentioned earlier
- with
youtube_query_cookie
set, the bot doesn't start - with
cookie_file
set the bot errors out when doing a !ysearch.
This doesn't happen with latest stable release.
Thanks
The user-agent option isn't accepted as well. I tested this even in latest release 7.2.3 and still applies.