diff --git a/libs/subscene_api/subscene.py b/libs/subscene_api/subscene.py index c8450518a..823e379fe 100644 --- a/libs/subscene_api/subscene.py +++ b/libs/subscene_api/subscene.py @@ -30,6 +30,7 @@ import enum import sys import requests import time +import logging is_PY2 = sys.version_info[0] < 3 if is_PY2: @@ -39,8 +40,13 @@ else: from contextlib import suppress from urllib2.request import Request, urlopen +from dogpile.cache.api import NO_VALUE +from subliminal.cache import region from bs4 import BeautifulSoup, NavigableString + +logger = logging.getLogger(__name__) + # constants HEADERS = { } @@ -50,6 +56,13 @@ DEFAULT_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWeb"\ "Kit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36" +ENDPOINT_RE = re.compile(ur'(?uis)
.*?