1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

Fix pylint anomalous-backslash-in-string warnings

Also, avoid having to escape " in strings by delimiting it with '
instead.
This commit is contained in:
Olof Johansson 2014-02-08 17:31:02 +01:00
parent 6d55a58796
commit b50fd6b907
2 changed files with 3 additions and 3 deletions

View File

@ -15,12 +15,12 @@ class Aftonbladet(Service):
def get(self, options): def get(self, options):
data = get_http_data(self.url) data = get_http_data(self.url)
match = re.search("data-aptomaId=\"([-0-9a-z]+)\"", data) match = re.search('data-aptomaId="([-0-9a-z]+)"', data)
if not match: if not match:
log.error("Can't find video info") log.error("Can't find video info")
sys.exit(2) sys.exit(2)
videoId = match.group(1) videoId = match.group(1)
match = re.search("data-isLive=\"(\w+)\"", data) match = re.search(r'data-isLive="(\w+)"', data)
if not match: if not match:
log.error("Can't find live info") log.error("Can't find live info")
sys.exit(2) sys.exit(2)

View File

@ -20,7 +20,7 @@ class Sr(Service, OpenGraphThumbMixin):
def get(self, options): def get(self, options):
data = get_http_data(self.url) data = get_http_data(self.url)
match = re.search("href=\"(/sida/[\.\/=a-z0-9&;\?]+\d+)\" aria-label", data) match = re.search(r'href="(/sida/[\.\/=a-z0-9&;\?]+\d+)" aria-label', data)
if not match: if not match:
log.error("Can't find audio info") log.error("Can't find audio info")
sys.exit(2) sys.exit(2)