[Servers] Removes Python Cloudscraper dependency
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
"python3-lxml.json",
|
"python3-lxml.json",
|
||||||
"python3-beautifulsoup4.json",
|
"python3-beautifulsoup4.json",
|
||||||
"python3-brotli.json",
|
"python3-brotli.json",
|
||||||
"python3-cloudscraper.json",
|
"python3-requests.json",
|
||||||
"python3-rarfile.json",
|
"python3-rarfile.json",
|
||||||
"python3-emoji.json",
|
"python3-emoji.json",
|
||||||
"python3-piexif.json",
|
"python3-piexif.json",
|
||||||
|
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "python3-cloudscraper",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": [
|
|
||||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"cloudscraper\" --no-build-isolation"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/db/51/a507c856293ab05cdc1db77ff4bc1268ddd39f29e7dc4919aa497f0adbec/charset_normalizer-2.1.1-py3-none-any.whl",
|
|
||||||
"sha256": "83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl",
|
|
||||||
"sha256": "90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/3f/ca/81fdcc8f69349d9fe0423d1b2d203d3e4748cb84abcfdacf7370db33640d/cloudscraper-1.2.66-py2.py3-none-any.whl",
|
|
||||||
"sha256": "ec30da6cee60d0a95e898d9b3aaf09291a0d8b6cf751e86c6f3420b699a00091"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/71/4c/3db2b8021bd6f2f0ceb0e088d6b2d49147671f25832fb17970e9b583d742/certifi-2022.12.7-py3-none-any.whl",
|
|
||||||
"sha256": "4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/65/0c/cc6644eaa594585e5875f46f3c83ee8762b647b51fc5b0fb253a242df2dc/urllib3-1.26.13-py2.py3-none-any.whl",
|
|
||||||
"sha256": "47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/ca/91/6d9b8ccacd0412c08820f72cebaa4f0c0441b5cda699c90f618b6f8a1b42/requests-2.28.1-py3-none-any.whl",
|
|
||||||
"sha256": "8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/6c/10/a7d0fa5baea8fe7b50f448ab742f26f52b80bfca85ac2be9d35cdd9a3246/pyparsing-3.0.9-py3-none-any.whl",
|
|
||||||
"sha256": "5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/05/d3/bf87a36bff1cb88fd30a509fd366c70ec30676517ee791b2f77e0e29817a/requests_toolbelt-0.10.1-py2.py3-none-any.whl",
|
|
||||||
"sha256": "18565aa58116d9951ac39baa288d3adb5b3ff975c4f25eee78555d89e8f247f7"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -2,10 +2,10 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-only or GPL-3.0-or-later
|
||||||
# Author: ISO-morphism <me@iso-morphism.name>
|
# Author: ISO-morphism <me@iso-morphism.name>
|
||||||
|
|
||||||
import cloudscraper
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import requests
|
||||||
|
|
||||||
from komikku.servers import Server
|
from komikku.servers import Server
|
||||||
from komikku.servers import USER_AGENT
|
from komikku.servers import USER_AGENT
|
||||||
@@ -50,7 +50,7 @@ class Mangahub(Server):
|
|||||||
self.api_key = None
|
self.api_key = None
|
||||||
|
|
||||||
if self.session is None:
|
if self.session is None:
|
||||||
self.session = cloudscraper.create_scraper()
|
self.session = requests.Session()
|
||||||
self.session.headers = {
|
self.session.headers = {
|
||||||
'User-Agent': USER_AGENT,
|
'User-Agent': USER_AGENT,
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# Author: Valéry Febvre <vfebvre@easter-eggs.com>
|
# Author: Valéry Febvre <vfebvre@easter-eggs.com>
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
import cloudscraper
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
import json
|
import json
|
||||||
import requests
|
import requests
|
||||||
@@ -53,7 +52,7 @@ class Mangakawaii(Server):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if self.session is None:
|
if self.session is None:
|
||||||
self.session = cloudscraper.create_scraper()
|
self.session = requests.Session()
|
||||||
cookie = requests.cookies.create_cookie(
|
cookie = requests.cookies.create_cookie(
|
||||||
name='mk_search_type',
|
name='mk_search_type',
|
||||||
value='manga',
|
value='manga',
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
# Author: Valéry Febvre <vfebvre@easter-eggs.com>
|
# Author: Valéry Febvre <vfebvre@easter-eggs.com>
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
import cloudscraper
|
|
||||||
import json
|
import json
|
||||||
|
import requests
|
||||||
|
|
||||||
from komikku.servers import Server
|
from komikku.servers import Server
|
||||||
from komikku.servers import USER_AGENT_MOBILE
|
from komikku.servers import USER_AGENT_MOBILE
|
||||||
@@ -38,7 +38,7 @@ class Mangasee(Server):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if self.session is None:
|
if self.session is None:
|
||||||
self.session = cloudscraper.create_scraper()
|
self.session = requests.Session()
|
||||||
self.session.headers = headers
|
self.session.headers = headers
|
||||||
|
|
||||||
def get_manga_data(self, initial_data):
|
def get_manga_data(self, initial_data):
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
brotli
|
brotli
|
||||||
cloudscraper
|
|
||||||
dateparser >= 1.1.4
|
dateparser >= 1.1.4
|
||||||
emoji
|
emoji
|
||||||
keyring >= 21.6.0
|
keyring >= 21.6.0
|
||||||
@@ -12,4 +11,5 @@ pure-protobuf
|
|||||||
PyGObject
|
PyGObject
|
||||||
python_magic
|
python_magic
|
||||||
rarfile
|
rarfile
|
||||||
|
requests
|
||||||
Unidecode
|
Unidecode
|
||||||
|
Reference in New Issue
Block a user