question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Apply cookies at the start of the bot from a config file

See original GitHub issue

Please tick all applicable boxes.

  • I am using Python 3.5.3 or higher (run python --version on the command line)
  • I have followed the official guides to install the bot for my system
  • I have updated my dependencies to the latest version using the appropriate update script

Which version are you using?

  • The latest master version (release-260419)
  • The latest review version

What type of issue are you creating?

  • Bug
  • Feature request
  • Question

Description of issue

As i’ve been told (https://github.com/Just-Some-Bots/MusicBot/issues/2220) , to play restricted videos from Youtube, we need to apply cookies to a running Youtube-dl… First, i don’t understand how to do that, and second, needing to do that every time i need to restart the bot is not an option for me.

Can you add a line in any config file to apply it when starting the bot?

Steps to reproduce


Log file

Please attach your MusicBot log file (located at logs/musicbot.log) to this issue. You can do so by dragging and dropping the file here. If you do not include your log file, you WILL be asked to provide one.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
AutumnClovecommented, Jul 26, 2021

I’ve solved it, after @AutumnClove message, if you want to use cookies file in order to bypass age-restriction on videos you need to download you cookies file from youtube in netscape format (i used “Get cookies.txt” extension to a browser). In order to use the cookies in MusicBot you need to add ‘cookiefile’: ‘Cookies location’, in downloader.py file located in MusicBot/musicbot/downloader.py in ytdl_format_options. Im not getting Unable to extract video data error anymore, so if you have that problem try doing that. See #2118 I’ll keep this open as an possible PR for someone in hactober 🤣

0reactions
LiderKonmilscommented, Jul 26, 2021

Goooood, now that’s working… but yeah… please, Devs, add a line in the options.ini to get the cookie file easier… for a non-programmer like me, it was a pain in the a**. And THANK YOU a lot @DestinyofYeet for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use cookies in Python Requests - Stack Overflow
You can use a session object. It stores the cookies so you can make requests, and it handles the cookies for you s...
Read more >
How to Configure Your Cookie Solution (Advanced Guide)
askConsentIfCMPNotFound (boolean, default true) – If set to true, and the IAB Framework preference is not found, the Cookie Solution will, by default,...
Read more >
Choose your bot actions - HubSpot Knowledge Base
Use this action to ask a question during your bot conversation and collect data to populate specific contact properties. You can select a ......
Read more >
What are session cookies? Do they need consent? - CookieYes
Session cookies are cookies that last only for a single user session. ... cookies are essential to navigate a website and use its...
Read more >
Use-case specific rule groups - AWS Documentation
Inspects the request cookie headers for PowerShell command injection attempts in web applications. The match patterns represent PowerShell commands. For example ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found