Remove 2captcha
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Michel Roux 2020-10-20 17:48:27 +02:00
parent 64c3c25c0b
commit df6c318322
2 changed files with 2 additions and 7 deletions

View File

@ -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()

View File

@ -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):