mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +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")
|
||||
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