Skip to content
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

dailymotion - ERROR: 'unicode' object has no attribute 'items' #26015

Closed
WoodpeckerBaby opened this issue Jul 15, 2020 · 1 comment
Closed

dailymotion - ERROR: 'unicode' object has no attribute 'items' #26015

WoodpeckerBaby opened this issue Jul 15, 2020 · 1 comment

Comments

@WoodpeckerBaby
Copy link

@WoodpeckerBaby WoodpeckerBaby commented Jul 15, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.06.16.1
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl https://www.dailymotion.com/video/x7tdzxy -v
[debug] System config: []
[debug] User config: [u'--cookies', u'/Users/redacted/.config/youtube-dl/cookies.txt', u'--download-archive', u'archive.txt', u'--user-agent', u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', u'--max-sleep-interval', u'15', u'--min-sleep-interval', u'1', u'--skip-unavailable-fragments', u'--external-downloader', u'aria2c', u'--http-chunk-size', u'10M', u'--ffmpeg-location', u'/usr/local/bin/ffmpeg', u'--add-metadata', u'--embed-thumbnail', u'--xattrs', u'--prefer-ffmpeg', u'--embed-subs', u'--audio-quality', u'0', u'--console-title', u'--ignore-errors', u'--retries', u'99', u'--fragment-retries', u'99', u'-f', u'bestvideo[vcodec!^=av01]+bestaudio']
[debug] Custom config: []
[debug] Command-line args: [u'https://www.dailymotion.com/video/x7tdzxy', u'-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 2.7.16 (CPython) - Darwin-19.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1, rtmpdump 2.4
[debug] Proxy map: {}
ERROR: 'unicode' object has no attribute 'items'
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 529, in extract
    self.initialize()
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 433, in initialize
    self._real_initialize()
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/dailymotion.py", line 43, in _real_initialize
    cookies = self._get_dailymotion_cookies()
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/dailymotion.py", line 31, in _get_dailymotion_cookies
    return self._get_cookies('https://www.dailymotion.com/')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 2856, in _get_cookies
    return compat_cookies.SimpleCookie(req.get_header('Cookie'))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py", line 583, in __init__
    if input: self.load(input)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py", line 643, in load
    for k, v in rawdata.items():
AttributeError: 'unicode' object has no attribute 'items'

Description

This happens on every dailymotion video I try to download, this is not unique to this particular video. Youtube works just fine.

Python version

$ python3 --version
Python 3.8.3
$ python --version
Python 2.7.16
@WoodpeckerBaby WoodpeckerBaby changed the title dailymotion dailymotion - ERROR: 'unicode' object has no attribute 'items' Jul 15, 2020
@WoodpeckerBaby
Copy link
Author

@WoodpeckerBaby WoodpeckerBaby commented Jul 15, 2020

I found a solution --ignore-config solves the problem.

The cookies I set for YouTube is also used against dailymotion, which is an unexpected.

I hope there is an easier way to define cookies and other site-specific variables in the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.