proposal for dailymotion #45

Closed
opened 2026-02-20 21:00:35 -05:00 by deekerman · 3 comments
Owner

Originally created by @yvestan on GitHub (Jan 19, 2011).

Hello,

I think that Dailymotion has changed its code. the "dcmo_html user" div no longer works but there is a new code in <head>.

Proposal (line 1303):

# mobj = re.search(r'(?im)
.*?(.+?)', webpage) mobj = re.search(r'(?im)(.+?)', webpage)

That's work fine for me

Originally created by @yvestan on GitHub (Jan 19, 2011). Hello, I think that Dailymotion has changed its code. the "dcmo_html user" div no longer works but there is a new code <PageMap> in <head>. Proposal (line 1303): <code> # mobj = re.search(r'(?im)<div class="dmco_html owner">.*?<a class="name" href="/.+?">(.+?)</a>', webpage) mobj = re.search(r'(?im)<Attribute name="owner">(.+?)</Attribute>', webpage) </code> That's work fine for me
deekerman 2026-02-20 21:00:35 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rg3 commented on GitHub (Jan 19, 2011):

User baryluk is the one maitaining the Dailymotion InfoExtractor. He told me he would take a look at this last weekend. I'll point him to this issue.

@rg3 commented on GitHub (Jan 19, 2011): User baryluk is the one maitaining the Dailymotion InfoExtractor. He told me he would take a look at this last weekend. I'll point him to this issue.
Author
Owner

@baryluk commented on GitHub (Jan 20, 2011):

Yes, proposed change works very well. Other possible way is to use

mobj = re.search(r'(?im)<span class="owner foreground2">.*?<a class="name" title=".*?" href="/.+?">(.+?)</a></span>', webpage)

But I think code given by yvestan will be more resitant to future changes, as it do not depend on actuall layout of page, but some metadata embeded in dailmotion pages - it is called PageMap, and it is xml embeded as comment in html head. there is also other interesting informations there (notably duration in seconds and upload date).

So rg3 please include this fix given by initial reporter (line 1305).

diff --git a/youtube-dl b/youtube-dl
index 103189b..869a32b 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -1302,7 +1302,7 @@ class DailymotionIE(InfoExtractor):
                video_title = mobj.group(1).decode('utf-8')
                video_title = sanitize_title(video_title)

-               mobj = re.search(r'(?im)<div class="dmco_html owner">.*?<a class="name" href="/.+?">(.+?)</a>', webpage)
+               mobj = re.search(r'(?im)<Attribute name="owner">(.+?)</Attribute>', webpage)
                if mobj is None:
                        self._downloader.trouble(u'ERROR: unable to extract uploader nickname')
                        return

Thanks.

@baryluk commented on GitHub (Jan 20, 2011): Yes, proposed change works very well. Other possible way is to use ``` mobj = re.search(r'(?im)<span class="owner foreground2">.*?<a class="name" title=".*?" href="/.+?">(.+?)</a></span>', webpage) ``` But I think code given by yvestan will be more resitant to future changes, as it do not depend on actuall layout of page, but some metadata embeded in dailmotion pages - it is called PageMap, and it is xml embeded as comment in html head. there is also other interesting informations there (notably duration in seconds and upload date). So rg3 please include this fix given by initial reporter (line 1305). ``` diff --git a/youtube-dl b/youtube-dl index 103189b..869a32b 100755 --- a/youtube-dl +++ b/youtube-dl @@ -1302,7 +1302,7 @@ class DailymotionIE(InfoExtractor): video_title = mobj.group(1).decode('utf-8') video_title = sanitize_title(video_title) - mobj = re.search(r'(?im)<div class="dmco_html owner">.*?<a class="name" href="/.+?">(.+?)</a>', webpage) + mobj = re.search(r'(?im)<Attribute name="owner">(.+?)</Attribute>', webpage) if mobj is None: self._downloader.trouble(u'ERROR: unable to extract uploader nickname') return ``` Thanks.
Author
Owner

@rg3 commented on GitHub (Jan 21, 2011):

Fix dailymotion support (closed by c02d8e4040)

@rg3 commented on GitHub (Jan 21, 2011): Fix dailymotion support (closed by c02d8e404019975060b195b7c7b6fb39944e321b)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#45
No description provided.