botamusique icon indicating copy to clipboard operation
botamusique copied to clipboard

youtube issues with master git

Open roughnecks opened this issue 1 year ago • 1 comments

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:

  1. git clone the repo
  2. configure the bot and set both options mentioned earlier
  3. with youtube_query_cookie set, the bot doesn't start
  4. with cookie_file set the bot errors out when doing a !ysearch.

This doesn't happen with latest stable release.

Thanks

roughnecks avatar Jun 06 '23 00:06 roughnecks

The user-agent option isn't accepted as well. I tested this even in latest release 7.2.3 and still applies.

roughnecks avatar Jun 07 '23 11:06 roughnecks