mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 12:15:40 +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:
parent
6d55a58796
commit
b50fd6b907
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user