diff --git a/lib/svtplay_dl/output.py b/lib/svtplay_dl/output.py index fb9b7f0..aac1e6e 100644 --- a/lib/svtplay_dl/output.py +++ b/lib/svtplay_dl/output.py @@ -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: diff --git a/lib/svtplay_dl/service/disney.py b/lib/svtplay_dl/service/disney.py index cd56ca3..5a6c1ea 100644 --- a/lib/svtplay_dl/service/disney.py +++ b/lib/svtplay_dl/service/disney.py @@ -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"]