more raw regexp strings

This commit is contained in:
j 2024-08-30 13:30:47 +02:00
commit ae10c5c9b9
11 changed files with 45 additions and 45 deletions

View file

@ -51,11 +51,11 @@ def get_movie_data(title, director):
'User-Agent': USER_AGENT
}
html = read_url(url, headers=headers, unicode=True)
results = re.compile('"(' + host + '.*?poster\.jpg)"').findall(html)
results = re.compile(r'"(' + host + r'.*?poster\.jpg)"').findall(html)
if results:
data['poster'] = results[0].replace('poster.jpg', 'poster-xlarge.jpg')
html = read_url(url + 'includes/playlists/web.inc', headers=headers, unicode=True)
results = re.compile('"(' + host + '\S+\.mov)"').findall(html)
results = re.compile(r'"(' + host + r'\S+\.mov)"').findall(html)
if results:
data['trailer'] = results[-1]
return data