mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Forgot r-prefix in re.search
This commit is contained in:
parent
9342d0c8bb
commit
12f666b5e6
@ -141,13 +141,13 @@ def output(options, filename, extention="mp4", openfd=True):
|
||||
return file_d
|
||||
|
||||
def findexpisode(directory, service, name):
|
||||
match = re.search("-(\w+)-\w+.(?!srt)\w{2,3}$", name)
|
||||
match = re.search(r"-(\w+)-\w+.(?!srt)\w{2,3}$", name)
|
||||
if not match:
|
||||
return False
|
||||
videoid = match.group(1)
|
||||
files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))]
|
||||
for i in files:
|
||||
match = re.search("-(\w+)-\w+.(?!srt)\w{2,3}$", i)
|
||||
match = re.search(r"-(\w+)-\w+.(?!srt)\w{2,3}$", i)
|
||||
if match:
|
||||
if service:
|
||||
if name.find(service) and match.group(1) == videoid:
|
||||
|
@ -19,7 +19,7 @@ class Disney(Service, OpenGraphThumbMixin):
|
||||
def get(self, options):
|
||||
parse = urlparse(self.url)
|
||||
if parse.hostname == "video.disney.se":
|
||||
match = re.search("Grill.burger=({.*}):", self.get_urldata())
|
||||
match = re.search(r"Grill.burger=({.*}):", self.get_urldata())
|
||||
if not match:
|
||||
log.error("Can't find video info")
|
||||
return
|
||||
@ -32,7 +32,7 @@ class Disney(Service, OpenGraphThumbMixin):
|
||||
if i["format"] == "mp4":
|
||||
yield HTTP(copy.copy(options), i["url"], i["bitrate"])
|
||||
else:
|
||||
match = re.search("uniqueId : '([^']+)'", self.get_urldata())
|
||||
match = re.search(r"uniqueId : '([^']+)'", self.get_urldata())
|
||||
if not match:
|
||||
log.error("Can't find video info")
|
||||
return
|
||||
@ -48,10 +48,10 @@ class Disney(Service, OpenGraphThumbMixin):
|
||||
url = "http://cdnapi.kaltura.com/html5/html5lib/v1.9.7.6/mwEmbedFrame.php?&wid=%s&uiconf_id=%s&entry_id=%s&playerId=%s&forceMobileHTML5=true&urid=1.9.7.6&callback=mwi" % \
|
||||
(partnerid, uiconfid, entryid, uniq)
|
||||
data = get_http_data(url)
|
||||
match = re.search("mwi\(({.*})\);", data)
|
||||
match = re.search(r"mwi\(({.*})\);", data)
|
||||
jsondata = json.loads(match.group(1))
|
||||
data = jsondata["content"]
|
||||
match = re.search("window.kalturaIframePackageData = ({.*});", data)
|
||||
match = re.search(r"window.kalturaIframePackageData = ({.*});", data)
|
||||
jsondata = json.loads(match.group(1))
|
||||
ks = jsondata["enviornmentConfig"]["ks"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user