mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
viafree: they changed from using StartPageStore to ApplicationStore
fixes: #845
This commit is contained in:
parent
4c62d87087
commit
4282992719
@ -84,7 +84,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
|||||||
if clips:
|
if clips:
|
||||||
return episodenr
|
return episodenr
|
||||||
else:
|
else:
|
||||||
match = re.search('"ContentPageProgramStore":({.*}),"StartPageStore', self.get_urldata())
|
match = self._conentpage(self.get_urldata())
|
||||||
if match:
|
if match:
|
||||||
janson = json.loads(match.group(1))
|
janson = json.loads(match.group(1))
|
||||||
for i in janson["format"]["videos"].keys():
|
for i in janson["format"]["videos"].keys():
|
||||||
@ -203,7 +203,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
|||||||
def _grab_episodes(self, options, seasons):
|
def _grab_episodes(self, options, seasons):
|
||||||
episodes = []
|
episodes = []
|
||||||
baseurl = self.url
|
baseurl = self.url
|
||||||
match = re.search("(sasong|sesong)-\d+", urlparse(self.url).path)
|
match = re.search("(saeson|sasong|sesong)-\d+", urlparse(self.url).path)
|
||||||
if match:
|
if match:
|
||||||
baseurl = self.url[:self.url.rfind("/")]
|
baseurl = self.url[:self.url.rfind("/")]
|
||||||
baseurl = baseurl[:baseurl.rfind("/")]
|
baseurl = baseurl[:baseurl.rfind("/")]
|
||||||
@ -227,11 +227,13 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
|||||||
def _isswe(self, url):
|
def _isswe(self, url):
|
||||||
if re.search(".se$", urlparse(url).netloc):
|
if re.search(".se$", urlparse(url).netloc):
|
||||||
return "sasong"
|
return "sasong"
|
||||||
|
elif re.search(".dk$", urlparse(url).netloc):
|
||||||
|
return "saeson"
|
||||||
else:
|
else:
|
||||||
return "sesong"
|
return "sesong"
|
||||||
|
|
||||||
def _conentpage(self, data):
|
def _conentpage(self, data):
|
||||||
return re.search('"ContentPageProgramStore":({.*}),[ ]*"StartPageStore', data)
|
return re.search('"ContentPageProgramStore":({.*}),[ ]*"ApplicationStore', data)
|
||||||
|
|
||||||
def _videos_to_list(self, url, vid, episodes):
|
def _videos_to_list(self, url, vid, episodes):
|
||||||
dataj = json.loads(self._get_video_data(vid).text)
|
dataj = json.loads(self._get_video_data(vid).text)
|
||||||
|
Loading…
Reference in New Issue
Block a user