mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
justin: refactor get function
This commit is contained in:
parent
e1100fa7d4
commit
6f228284cf
@ -52,19 +52,14 @@ class Justin(Service):
|
||||
|
||||
match = re.match(r'/(\w+)/([bcv])/(\d+)', urlp.path)
|
||||
if not match:
|
||||
try:
|
||||
for i in self._get_channel(options, urlp):
|
||||
yield i
|
||||
except JustinUrlException as e:
|
||||
log.debug(str(e))
|
||||
log.error("This twitch/justin video type is unsupported")
|
||||
return
|
||||
data = self._get_channel(options, urlp)
|
||||
else:
|
||||
if match.group(2) in ["b", "c"]:
|
||||
log.error("This twitch video type is unsupported")
|
||||
return
|
||||
data = self._get_archive(options, match.group(3))
|
||||
try:
|
||||
for i in self._get_archive(options, match.group(3)):
|
||||
for i in data:
|
||||
yield i
|
||||
except JustinUrlException as e:
|
||||
log.debug(str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user