mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +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:
|
||||
return episodenr
|
||||
else:
|
||||
match = re.search('"ContentPageProgramStore":({.*}),"StartPageStore', self.get_urldata())
|
||||
match = self._conentpage(self.get_urldata())
|
||||
if match:
|
||||
janson = json.loads(match.group(1))
|
||||
for i in janson["format"]["videos"].keys():
|
||||
@ -203,7 +203,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
def _grab_episodes(self, options, seasons):
|
||||
episodes = []
|
||||
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:
|
||||
baseurl = self.url[:self.url.rfind("/")]
|
||||
baseurl = baseurl[:baseurl.rfind("/")]
|
||||
@ -227,11 +227,13 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
def _isswe(self, url):
|
||||
if re.search(".se$", urlparse(url).netloc):
|
||||
return "sasong"
|
||||
elif re.search(".dk$", urlparse(url).netloc):
|
||||
return "saeson"
|
||||
else:
|
||||
return "sesong"
|
||||
|
||||
def _conentpage(self, data):
|
||||
return re.search('"ContentPageProgramStore":({.*}),[ ]*"StartPageStore', data)
|
||||
return re.search('"ContentPageProgramStore":({.*}),[ ]*"ApplicationStore', data)
|
||||
|
||||
def _videos_to_list(self, url, vid, episodes):
|
||||
dataj = json.loads(self._get_video_data(vid).text)
|
||||
|
Loading…
Reference in New Issue
Block a user