mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
parent
18a8758ee8
commit
82265dab50
@ -41,13 +41,8 @@ class Svtplay(Service, MetadataThumbMixin):
|
|||||||
urldata = self.get_urldata()
|
urldata = self.get_urldata()
|
||||||
|
|
||||||
if parse.path[:8] == "/kanaler":
|
if parse.path[:8] == "/kanaler":
|
||||||
match = re.search('data-video-id="([\\w-]+)"', urldata)
|
ch = "ch-{}".format(parse.path[parse.path.rfind("/") + 1 :])
|
||||||
|
_url = urljoin(URL_VIDEO_API, ch)
|
||||||
if not match:
|
|
||||||
yield ServiceError("Can't find video info.")
|
|
||||||
return
|
|
||||||
|
|
||||||
_url = urljoin(URL_VIDEO_API, match.group(1))
|
|
||||||
res = self.http.get(_url)
|
res = self.http.get(_url)
|
||||||
try:
|
try:
|
||||||
janson = res.json()
|
janson = res.json()
|
||||||
|
Loading…
Reference in New Issue
Block a user