mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
Merge pull request #272 from Jellyfrog/patch-1
Make oppetarkiv work with --all-episodes again
This commit is contained in:
commit
ee23ccb334
@ -19,7 +19,6 @@ class OppetArkiv(Svtplay):
|
|||||||
log.error("Couldn't find title")
|
log.error("Couldn't find title")
|
||||||
return
|
return
|
||||||
program = match.group(1)
|
program = match.group(1)
|
||||||
more = True
|
|
||||||
episodes = []
|
episodes = []
|
||||||
|
|
||||||
n = 0
|
n = 0
|
||||||
@ -28,12 +27,13 @@ class OppetArkiv(Svtplay):
|
|||||||
else:
|
else:
|
||||||
sort = "tid_stigande"
|
sort = "tid_stigande"
|
||||||
|
|
||||||
while more:
|
while True:
|
||||||
url = "http://www.oppetarkiv.se/etikett/titel/%s/?sida=%s&sort=%s&embed=true" % (program, page, sort)
|
url = "http://www.oppetarkiv.se/etikett/titel/%s/?sida=%s&sort=%s&embed=true" % (program, page, sort)
|
||||||
data = self.http.request("get", url).text
|
data = self.http.request("get", url)
|
||||||
visa = re.search(r'svtXColorDarkLightGrey', data)
|
if data.status_code == 404:
|
||||||
if not visa:
|
break
|
||||||
more = False
|
|
||||||
|
data = data.text
|
||||||
regex = re.compile(r'href="(/video/[^"]+)"')
|
regex = re.compile(r'href="(/video/[^"]+)"')
|
||||||
for match in regex.finditer(data):
|
for match in regex.finditer(data):
|
||||||
if n == options.all_last:
|
if n == options.all_last:
|
||||||
|
Loading…
Reference in New Issue
Block a user