1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-06-30 11:02:54 -05:00

[utils] Fix url_basename

This commit is contained in:
Philipp Hagemeister
2013-12-17 12:32:58 +01:00
parent cecaaf3f58
commit d6c7a367e8
2 changed files with 4 additions and 1 deletions

View File

@ -1087,7 +1087,7 @@ def remove_start(s, start):
def url_basename(url):
m = re.match(r'(?:https?:|)//[^/]+/(?:[^/?#]+/)?([^/?#]+)/?(?:[?#]|$)', url)
m = re.match(r'(?:https?:|)//[^/]+/(?:[^?#]+/)?([^/?#]+)/?(?:[?#]|$)', url)
if not m:
return u''
return m.group(1)