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

Fails on Dailymotion #281

Closed
baskerville opened this issue Jan 22, 2012 · 11 comments
Closed

Fails on Dailymotion #281

baskerville opened this issue Jan 22, 2012 · 11 comments

Comments

@baskerville
Copy link

@baskerville baskerville commented Jan 22, 2012

youtube-dl 'http://www.dailymotion.com/video/x6wzpl_50-ans-de-l-ihes-marc-chemillier_tech'

Fails with the following message:

ERROR: unable to extract title
@phihag
Copy link
Contributor

@phihag phihag commented Feb 26, 2012

Which youtube-dl version are you using? This works fine for me (from Germany) with youtube-dl 2012.02.26.

@baskerville
Copy link
Author

@baskerville baskerville commented Feb 27, 2012

You're right: it works with the latest Git version.

@5moufl
Copy link
Contributor

@5moufl 5moufl commented Oct 30, 2012

with the latest git version:
WARNING: unable to extract uploader nickname

@phihag phihag reopened this Oct 30, 2012
@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Oct 30, 2012

Please be sure to use the really latest, I think I fixed this a couple of days ago in fe4d68e. Please reopen if you still suffer this issue anyway.

@5moufl
Copy link
Contributor

@5moufl 5moufl commented Oct 31, 2012

I just pulled the really latest and:

$ youtube-dl "http://www.dailymotion.com/video/xupj7x_interview-one-word-d-antoine-saout_sport"
[dailymotion] xupj7x: Downloading webpage
[dailymotion] xupj7x: Extracting information
[dailymotion] Using hd720URL
WARNING: unable to extract uploader nickname
@FiloSottile FiloSottile reopened this Oct 31, 2012
@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Oct 31, 2012

Ah, got it, you have to make youtube-dl to update the binary, or use python -m youtube_dl as the binary gets the new patches only on releases. Sorry not to have intuited that before... I should push a FAQ.

@5moufl
Copy link
Contributor

@5moufl 5moufl commented Oct 31, 2012

All good.

@yvestan
Copy link

@yvestan yvestan commented Nov 7, 2012

Hi,

I've always this bug with the last git revision ?!

This video is OK to download :
"http://www.dailymotion.com/video/xupj7x_interview-one-word-d-antoine-saout_sport"

This other not :
"http://www.dailymotion.com/video/xbj1fg_stargate-studios-reel_shortfilms"

@phihag phihag reopened this Nov 7, 2012
@yvestan
Copy link

@yvestan yvestan commented Nov 7, 2012

I thinks It's because regexp (line 695) match only "normal" Dailymotion user like :

 <span class="owner foreground2">Par    <a class="name" rel="author" title="aller sur la page profil de madeinpoker" href="/madeinpoker">madeinpoker</a></span>

(match "madeinpoker")

But Dailymotion "official user" can use logo instead of simple link :

<span rel="author" class="name owner_link linkable" data-href="/FilmGeek-TV">FilmGeek-TV</span>

(match "FilmGeek-TV")

It's should to test this two possibility

I've tested with PHP

$owner = preg_match('#<span rel="author".*>(.*)</span>#', $f, $match);  

Can you help me to add this in Python ;) ?

(sorry for my bad english)

@yvestan
Copy link

@yvestan yvestan commented Nov 7, 2012

Works fine with this :

diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index a5c8b91..fd42f24 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -694,7 +694,12 @@ class DailymotionIE(InfoExtractor):
                video_uploader = u'NA'
                mobj = re.search(r'(?im)<span class="owner[^\"]+?">[^<]+?<a [^>]+?>([^<]+?)</a>', webpage)
                if mobj is None:
-                       self._downloader.trouble(u'WARNING: unable to extract uploader nickname')
+                       # lookin for official user
+                       mobj_official = re.search(r'<span rel="author".*>([a-zA-Z0-9\-]*)</span>', webpage)
+                       if mobj_official is None:
+                               self._downloader.trouble(u'WARNING: unable to extract uploader nickname')
+                       else:
+                               video_uploader = mobj_official.group(1)
                else:
                        video_uploader = mobj.group(1)

May be not a multiline regexp ?

I propose a pull request ?

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Nov 7, 2012

LGTM, applying, thanks!

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
5 participants
You can’t perform that action at this time.