[blinkxx] Add support for youtube videos
[youtube-dl] / youtube_dl / utils.py
index d5069dcca98dea4e6071d3d7d35a42576dcd4604..cc391bddd7a4bc39ad475795f133271b39fc3ea2 100644 (file)
@@ -761,7 +761,6 @@ def unified_strdate(date_str):
         '%Y-%m-%dT%H:%M:%S.%fZ',
         '%Y-%m-%dT%H:%M:%S.%f0Z',
         '%Y-%m-%dT%H:%M:%S',
-        '%Y-%m-%dT%H:%M:%S',
     ]
     for expression in format_expressions:
         try:
@@ -1092,7 +1091,5 @@ def remove_start(s, start):
 
 
 def url_basename(url):
-    m = re.match(r'(?:https?:|)//[^/]+/(?:[^?#]+/)?([^/?#]+)/?(?:[?#]|$)', url)
-    if not m:
-        return u''
-    return m.group(1)
+    path = compat_urlparse.urlparse(url).path
+    return path.strip(u'/').split(u'/')[-1]