summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeorgi Kyosev <[email protected]>2021-04-18 17:19:16 +0300
committerGitHub <[email protected]>2021-04-18 10:19:16 -0400
commitd9e0e2ec9232bc0b9a90249e3091f30282860e3f (patch)
treeddb768a1dbd263d459a77bd25826ab3135e20c61
parent773883348d28b30952552ed1d4398fc2056df6e3 (diff)
downloadbazarr-d9e0e2ec9232bc0b9a90249e3091f30282860e3f.tar.gz
bazarr-d9e0e2ec9232bc0b9a90249e3091f30282860e3f.zip
Fixed Yavkanet provider
-rw-r--r--libs/subliminal_patch/providers/yavkanet.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/subliminal_patch/providers/yavkanet.py b/libs/subliminal_patch/providers/yavkanet.py
index b6636c55d..157f50e03 100644
--- a/libs/subliminal_patch/providers/yavkanet.py
+++ b/libs/subliminal_patch/providers/yavkanet.py
@@ -40,7 +40,7 @@ class YavkaNetSubtitle(Subtitle):
self.release_info = filename
if fps:
if video.fps and float(video.fps) == fps:
- self.release_info += " <b>[{:.3f}]</b>".format(fps)
+ self.release_info += " [{:.3f}]".format(fps)
else:
self.release_info += " [{:.3f}]".format(fps)
@@ -128,8 +128,8 @@ class YavkaNetProvider(Provider):
params['l'] = 'IT'
logger.info('Searching subtitle %r', params)
- response = self.session.get('http://yavka.net/subtitles.php', params=params, allow_redirects=False, timeout=10, headers={
- 'Referer': 'http://yavka.net/',
+ response = self.session.get('https://yavka.net/subtitles.php', params=params, allow_redirects=False, timeout=10, headers={
+ 'Referer': 'https://yavka.net/',
})
response.raise_for_status()
@@ -162,7 +162,7 @@ class YavkaNetProvider(Provider):
element = row.find('a', {'class': 'click'})
uploader = element.get_text() if element else None
logger.info('Found subtitle link %r', link)
- sub = self.download_archive_and_add_subtitle_files('http://yavka.net/' + link, language, video, fps)
+ sub = self.download_archive_and_add_subtitle_files('https://yavka.net' + link + '/', language, video, fps)
for s in sub:
s.title = title
s.notes = notes
@@ -202,8 +202,8 @@ class YavkaNetProvider(Provider):
cache_key = sha1(link.encode("utf-8")).digest()
request = region.get(cache_key)
if request is NO_VALUE:
- request = self.session.get(link, headers={
- 'Referer': 'http://yavka.net/subtitles.php'
+ request = self.session.post(link, headers={
+ 'referer': link
})
request.raise_for_status()
region.set(cache_key, request)