Fix with 2Captcha (not optimal) + fix π
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2020-05-16 19:19:31 +02:00
parent 35c59031b4
commit 5af34affa9
6 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# 𝛑 😼
# π 😼
> "PyNyaaTa", Xéfir's personal animes torrent search engine
[![Build Status](https://ci.crystalyx.net/api/badges/Xefir/PyNyaaTa/status.svg)](https://ci.crystalyx.net/Xefir/PyNyaaTa)

View File

@ -14,6 +14,7 @@ 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

View File

@ -9,10 +9,13 @@ from cloudscraper.exceptions import CloudflareException
from requests import RequestException
from .cloudscraper import CloudScraperWrapper
from ..config import CACHE_TIMEOUT, IS_DEBUG, REQUESTS_TIMEOUT
from ..config import CACHE_TIMEOUT, IS_DEBUG, REQUESTS_TIMEOUT, TWOCAPTCHA_API_KEY
scraper = CloudScraperWrapper.create_scraper(browser={
'custom': 'ScraperBot/1.0'
}, recaptcha={
'provider': '2captcha',
'api_key': TWOCAPTCHA_API_KEY
})

View File

@ -5,8 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Xefir's animes search engine (っ^‿^)っ">
<title>PyNyaaTa {% block title %}{% endblock %}</title>
<link rel="shortcut icon" href="{{ url_for('static', filename='favicons/favicon.ico') }}">
<title>PyNyaaTa - {% block title %}{% endblock %}</title>
<link rel="icon" href="{{ url_for('static', filename='favicons/favicon.ico') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/bulma.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/bulma-tooltip.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/font-awesome.min.css') }}">
@ -17,7 +17,7 @@
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-start">
<a class="navbar-item has-tooltip-bottom" data-tooltip="Home" href="{{ url_for('home') }}">
𝛑 😼
π 😼
</a>
<a class="navbar-item has-tooltip-bottom" data-tooltip="Latest torrents" href="{{ url_for('latest') }}">
<i class="fa fa-newspaper-o"></i><i>&nbsp;</i>

View File

@ -8,4 +8,5 @@ requests==2.23.0
beautifulsoup4==4.9.0
python-dotenv==0.13.0
cloudscraper==1.2.38
polling==0.3.1
dateparser==0.7.4

View File

@ -13,7 +13,7 @@ setup(
version=datetime.now().strftime("%Y%m%d%H%M"),
author="Xéfir Destiny",
author_email="xefir@crystalyx.net",
description="𝛑 😼 た, Xéfir's personal animes torrent search engine",
description="π 😼た, Xéfir's personal animes torrent search engine",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://git.crystalyx.net/Xefir/PyNyaaTa",