1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

Make oppetarkiv work with --all-episodes again

seems they changed some css-classes
This commit is contained in:
Jellyfrog 2015-09-30 00:47:49 +02:00
parent e7d5dc1f6f
commit 0be6bddf8c

View File

@ -19,7 +19,6 @@ class OppetArkiv(Svtplay):
log.error("Couldn't find title")
return
program = match.group(1)
more = True
episodes = []
n = 0
@ -28,12 +27,13 @@ class OppetArkiv(Svtplay):
else:
sort = "tid_stigande"
while more:
while True:
url = "http://www.oppetarkiv.se/etikett/titel/%s/?sida=%s&sort=%s&embed=true" % (program, page, sort)
data = self.http.request("get", url).text
visa = re.search(r'svtXColorDarkLightGrey', data)
if not visa:
more = False
data = self.http.request("get", url)
if data.status_code == 404:
break
data = data.text
regex = re.compile(r'href="(/video/[^"]+)"')
for match in regex.finditer(data):
if n == options.all_last: