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

proposal for dailymotion #60

Closed
yvestan opened this issue Jan 19, 2011 · 3 comments
Closed

proposal for dailymotion #60

yvestan opened this issue Jan 19, 2011 · 3 comments
Labels
bug

Comments

@yvestan
Copy link

@yvestan yvestan commented 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 .

Proposal (line 1303):

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

That's work fine for me

@rg3
Copy link
Collaborator

@rg3 rg3 commented 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.

@baryluk
Copy link
Contributor

@baryluk baryluk commented Jan 21, 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.

@rg3
Copy link
Collaborator

@rg3 rg3 commented Jan 21, 2011

Fix dailymotion support (closed by c02d8e4)

This issue was closed.
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
3 participants
You can’t perform that action at this time.