diff options
author | morpheus65535 <[email protected]> | 2020-12-21 23:44:24 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2020-12-21 23:44:24 -0500 |
commit | e7d68f43168dd9536f081bc749fa4344097755a2 (patch) | |
tree | 4754aa2a529d6328365cd52378260b5e1d2e0a19 /libs | |
parent | d7333d9172380acf413859a148374eb9fd1bc6b6 (diff) | |
download | bazarr-e7d68f43168dd9536f081bc749fa4344097755a2.tar.gz bazarr-e7d68f43168dd9536f081bc749fa4344097755a2.zip |
Removed some Python 2.7.x compatibility code.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/subliminal_patch/providers/subscene.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/subliminal_patch/providers/subscene.py b/libs/subliminal_patch/providers/subscene.py index 60f7b8e53..b5213b807 100644 --- a/libs/subliminal_patch/providers/subscene.py +++ b/libs/subliminal_patch/providers/subscene.py @@ -1,20 +1,18 @@ # coding=utf-8 -from __future__ import absolute_import import io import logging import os import time import traceback +from urllib import parse import requests import inflect import re import json -import six.moves.urllib.parse -import sys import html from zipfile import ZipFile @@ -32,7 +30,6 @@ from subliminal_patch.subtitle import Subtitle, guess_matches from subliminal_patch.converters.subscene import language_ids, supported_languages from subscene_api.subscene import search, Subtitle as APISubtitle, SITE_DOMAIN from subzero.language import Language -import six p = inflect.engine() @@ -164,7 +161,7 @@ class SubsceneProvider(Provider, ProviderSubtitleArchiveMixin): if match: h = html data = json.loads(h.unescape(match.group(1))) - login_url = six.moves.urllib.parse.urljoin(data["siteUrl"], data["loginUrl"]) + login_url = parse.urljoin(data["siteUrl"], data["loginUrl"]) time.sleep(1.0) r = self.session.post(login_url, @@ -192,7 +189,7 @@ class SubsceneProvider(Provider, ProviderSubtitleArchiveMixin): else: cj = self.session.cookies.copy() store_cks = ("scene", "idsrv", "idsrv.xsrf", "idsvr.clients", "idsvr.session", "idsvr.username") - for cn in six.iterkeys(self.session.cookies): + for cn in self.session.cookies.keys(): if cn not in store_cks: del cj[cn] |