[Feature Request] Apply cookies at the start of the bot from a config file
See original GitHub issuePlease 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:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 🤣
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.