Fix regression with captcha
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5af34affa9
commit
d6ac52f08d
@ -14,10 +14,14 @@ ADMIN_PASSWORD = generate_password_hash(environ.get('ADMIN_PASSWORD', 'secret'))
|
||||
APP_PORT = environ.get('FLASK_PORT', 5000)
|
||||
CACHE_TIMEOUT = environ.get('CACHE_TIMEOUT', 60 * 60)
|
||||
REQUESTS_TIMEOUT = environ.get('REQUESTS_TIMEOUT', 5)
|
||||
TWOCAPTCHA_API_KEY = environ.get('2CAPTCHA_API_KEY')
|
||||
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()
|
||||
|
@ -13,10 +13,7 @@ from ..config import CACHE_TIMEOUT, IS_DEBUG, REQUESTS_TIMEOUT, TWOCAPTCHA_API_K
|
||||
|
||||
scraper = CloudScraperWrapper.create_scraper(browser={
|
||||
'custom': 'ScraperBot/1.0'
|
||||
}, recaptcha={
|
||||
'provider': '2captcha',
|
||||
'api_key': TWOCAPTCHA_API_KEY
|
||||
})
|
||||
}, recaptcha=TWOCAPTCHA_API_KEY)
|
||||
|
||||
|
||||
class ConnectorReturn(Enum):
|
||||
|
Reference in New Issue
Block a user