mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 15:14:14 +01:00
Make oppetarkiv work with --all-episodes again
seems they changed some css-classes
This commit is contained in:
parent
e7d5dc1f6f
commit
0be6bddf8c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user