gordenbrown51 / damnvid

Automatically exported from code.google.com/p/damnvid
GNU General Public License v3.0
0 stars 0 forks source link

youtu.be support #275

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
as Youtube offers shortening video links via http://youtu.be/ it would be great 
if DamnVid supports those.
http://youtu.be/{VIDEOID} is equivalent to 
http://www.youtube.com/watch?v={VIDEOID}

I guess this can be fixed by changing line 8 in the youtube module
from:
'url':re.compile('^https?://(?:[-_\w]+\.)*youtube\.\w+.*(?:v|(?:video_)?id)[/=](
[-_\w]{6,})',re.IGNORECASE),
to:
'url':re.compile('^https?://(?:[-_\w]+\.)*youtu\.?be\.?\w*.*(?:v|(?:video_)?id)?
[/=]?([-_\w]{6,})',re.IGNORECASE)

(someone already reported this missing feature as an issue: 
http://code.google.com/p/damnvid/issues/detail?id=213)

Original issue reported on code.google.com by jtbrinkmann@gmail.com on 3 Mar 2012 at 11:40

Attachments:

GoogleCodeExporter commented 9 years ago
Very nice.

I ended up using:
'url': 
re.compile('^https?://(?:[-_\w]+\.)*(?:youtu\.be|youtube\.\w+.*(?:v|(?:video_)?i
d))[/=]([-_\w]{6,})',re.IGNORECASE)

Released new YouTube module version (1.98).

Original comment by windypo...@gmail.com on 3 Mar 2012 at 7:16