mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 12:15:40 +01:00
parent
5057322c85
commit
0ddbc9752e
@ -66,12 +66,25 @@ class Urplay(Service, OpenGraphThumbMixin):
|
|||||||
|
|
||||||
def find_all_episodes(self, options):
|
def find_all_episodes(self, options):
|
||||||
parse = urlparse(self.url)
|
parse = urlparse(self.url)
|
||||||
|
episodes = []
|
||||||
|
|
||||||
|
if parse.netloc == "urskola.se":
|
||||||
|
data = self.get_urldata()
|
||||||
|
match = re.search('data-limit="[^"]+" href="([^"]+)"', data)
|
||||||
|
if match:
|
||||||
|
res = self.http.get(urljoin("http://urskola.se", match.group(1)))
|
||||||
|
data = res.text
|
||||||
|
tags = re.findall('<a class="puff tv video" title="[^"]+" href="([^"]+)"', data)
|
||||||
|
for i in tags:
|
||||||
|
url = urljoin("http://urskola.se/", i)
|
||||||
|
if url not in episodes:
|
||||||
|
episodes.append(url)
|
||||||
|
else:
|
||||||
match = re.search("/program/\d+-(\w+)-", parse.path)
|
match = re.search("/program/\d+-(\w+)-", parse.path)
|
||||||
if not match:
|
if not match:
|
||||||
log.error("Can't find any videos")
|
log.error("Can't find any videos")
|
||||||
return None
|
return None
|
||||||
keyword = match.group(1)
|
keyword = match.group(1)
|
||||||
episodes = []
|
|
||||||
all_links = re.findall('card-link" href="([^"]+)"', self.get_urldata())
|
all_links = re.findall('card-link" href="([^"]+)"', self.get_urldata())
|
||||||
for i in all_links:
|
for i in all_links:
|
||||||
match = re.search("/program/\d+-(\w+)-", i)
|
match = re.search("/program/\d+-(\w+)-", i)
|
||||||
|
Loading…
Reference in New Issue
Block a user