-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Youtube.com + cookies: 'unicode' object has no attribute 'items' #28640
Comments
For context on cookies I have:
|
@Suika It doesn't seem to work with python2 anymore. Manually running python3 on it (even though it's compressed) does work though. On Unix at least, it has |
I can't speak for non-Debian-type Linux distros, but there you can install the ^ However, the problem's that if anything uses Python 2-exclusive scripts, they'll break. I know Ubuntu's latest versions are using Python 3-exclusive scripts and Python 2 was relocated to multiverse repo (which is disabled by default IIRC), so Ubuntu is safe. Alternatively you can make a shell ##If in ${PATH}:
alias youtube-dl='python3 youtube-dl '
##If not in ${PATH}:
alias youtube-dl='python3 /path/to/youtube-dl ' Notice the trailing space ! |
Nice knowing all that, but the docs list support for python 2.6/2.7. Sadly it is still a bug that needs fixing, as it breaks that version "support". |
I'm sure they'll soon figure out the cause. On a passing note, you should always quote Internet addresses instead of trying to work around the shell processing like you did with the question mark and equal sign: since you're on Linux (or if you were using Micro$oft PowerShell), just single-quote (double-quoting should work for every other shell, including Command Prompt on Window$) the whole address to save yourself massive amounts of headache. |
@remitamine can you please make a new release with the fix you've just commited? |
* https://github.com/ytdl-org/youtube-dl: [youtube] prioritize information from YoutubeIE for playlist entries(closes ytdl-org#28619, closes ytdl-org#28636) [extractor/common] fix _get_cookies method for python 2(ytdl-org#20673, ytdl-org#23256, ytdl-org#20326, closes ytdl-org#28640)
Your fix worked beautifully:
Thank you so much. |
Using this fix do work for downloading video but I just try to run the command |
That's exactly your problem: |
There isn't a workaround for this issue like a shell alias? I prefer not installing this package for now if I had to use a program relying on python2. I can wait for a further version of youtube-dl which implement the fix though. |
@the-saddest-clown the fix for this issue has been released 20 days ago. Just update your version of youtube-dl |
OK deleted the old /usr/local/bin/youtube-dl and reinstalled the last version 2021.04.26. It works. As long as |
I already told you the shell alias approach, too. I created+tested a Bash script which "modifies" ytdl to use Python 3 when executed. It's a quick hack, it doesn't actually modify anything, it simply creates a shell script which uses the same shebang ytdl currently does, then appends the latest actual ytdl binary into the file, the same way as ytdl's executable binary's created. |
Checklist
Verbose log
Description
Since as of two days ago, 31 March 2021, youtube.com stopped working when using cookies and youtube-dl version 2021.04.01
I tested the
--username
/--password
parameters and indeed I can login and download videos.So, I pulled the youtube-dl version 2021.03.31 and it was able to download videos using cookies. So something between 8f493de and ca304be messed up the way cookies are being processed.
The text was updated successfully, but these errors were encountered: