Support youtu.be urls in _from_url
This commit is contained in:
parent
dd8b276b35
commit
10b7875544
1 changed files with 3 additions and 1 deletions
|
@ -85,7 +85,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
parsed = urllib.parse.urlparse(url)
|
parsed = urllib.parse.urlparse(url)
|
||||||
query = urllib.parse.parse_qs(parsed.query)
|
query = urllib.parse.parse_qs(parsed.query)
|
||||||
|
|
||||||
if parsed.path == "/watch" and "v" in query:
|
if parsed.hostname == "youtu.be" amd parsed.path:
|
||||||
|
return self.video_details(parsed.path[1:])
|
||||||
|
elif parsed.path == "/watch" and "v" in query:
|
||||||
return self.video_details(query["v"][0])
|
return self.video_details(query["v"][0])
|
||||||
elif parsed.path == "/playlist" and "list" in query:
|
elif parsed.path == "/playlist" and "list" in query:
|
||||||
return self.playlist_details(query["list"][0])
|
return self.playlist_details(query["list"][0])
|
||||||
|
|
Loading…
Reference in a new issue