This commit is contained in:
parent
64c3c25c0b
commit
df6c318322
@ -17,11 +17,6 @@ REQUESTS_TIMEOUT = int(environ.get('REQUESTS_TIMEOUT', 5))
|
||||
BLACKLIST_WORDS = environ.get('BLACKLIST_WORDS', '').split(',') if environ.get('BLACKLIST_WORDS', '') else []
|
||||
MYSQL_ENABLED = False
|
||||
|
||||
TWOCAPTCHA_API_KEY = {
|
||||
'provider': '2captcha',
|
||||
'api_key': environ.get('2CAPTCHA_API_KEY')
|
||||
} if environ.get('2CAPTCHA_API_KEY') else None
|
||||
|
||||
app = Flask(__name__)
|
||||
app.name = 'PyNyaaTa'
|
||||
app.secret_key = urandom(24).hex()
|
||||
|
@ -9,9 +9,9 @@ from cloudscraper import create_scraper
|
||||
from cloudscraper.exceptions import CloudflareException, CaptchaException
|
||||
from requests import RequestException
|
||||
|
||||
from ..config import CACHE_TIMEOUT, IS_DEBUG, REQUESTS_TIMEOUT, TWOCAPTCHA_API_KEY
|
||||
from ..config import CACHE_TIMEOUT, IS_DEBUG, REQUESTS_TIMEOUT
|
||||
|
||||
scraper = create_scraper(interpreter='js2py', captcha=TWOCAPTCHA_API_KEY, debug=IS_DEBUG)
|
||||
scraper = create_scraper(interpreter='js2py', debug=IS_DEBUG)
|
||||
|
||||
|
||||
class ConnectorReturn(Enum):
|
||||
|
Reference in New Issue
Block a user