mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-07 06:24:35 +00:00
Fixed xHamster, added support of proxies to self-check mode (#259)
This commit is contained in:
+4
-1
@@ -764,6 +764,7 @@ async def site_self_check(
|
|||||||
semaphore,
|
semaphore,
|
||||||
db: MaigretDatabase,
|
db: MaigretDatabase,
|
||||||
silent=False,
|
silent=False,
|
||||||
|
proxy=None,
|
||||||
tor_proxy=None,
|
tor_proxy=None,
|
||||||
i2p_proxy=None,
|
i2p_proxy=None,
|
||||||
):
|
):
|
||||||
@@ -789,6 +790,7 @@ async def site_self_check(
|
|||||||
forced=True,
|
forced=True,
|
||||||
no_progressbar=True,
|
no_progressbar=True,
|
||||||
retries=1,
|
retries=1,
|
||||||
|
proxy=proxy,
|
||||||
tor_proxy=tor_proxy,
|
tor_proxy=tor_proxy,
|
||||||
i2p_proxy=i2p_proxy,
|
i2p_proxy=i2p_proxy,
|
||||||
)
|
)
|
||||||
@@ -845,6 +847,7 @@ async def self_check(
|
|||||||
logger,
|
logger,
|
||||||
silent=False,
|
silent=False,
|
||||||
max_connections=10,
|
max_connections=10,
|
||||||
|
proxy=None,
|
||||||
tor_proxy=None,
|
tor_proxy=None,
|
||||||
i2p_proxy=None,
|
i2p_proxy=None,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
@@ -859,7 +862,7 @@ async def self_check(
|
|||||||
|
|
||||||
for _, site in all_sites.items():
|
for _, site in all_sites.items():
|
||||||
check_coro = site_self_check(
|
check_coro = site_self_check(
|
||||||
site, logger, sem, db, silent, tor_proxy, i2p_proxy
|
site, logger, sem, db, silent, proxy, tor_proxy, i2p_proxy
|
||||||
)
|
)
|
||||||
future = asyncio.ensure_future(check_coro)
|
future = asyncio.ensure_future(check_coro)
|
||||||
tasks.append(future)
|
tasks.append(future)
|
||||||
|
|||||||
@@ -548,6 +548,7 @@ async def main():
|
|||||||
db,
|
db,
|
||||||
site_data,
|
site_data,
|
||||||
logger,
|
logger,
|
||||||
|
proxy=args.proxy,
|
||||||
max_connections=args.connections,
|
max_connections=args.connections,
|
||||||
tor_proxy=args.tor_proxy,
|
tor_proxy=args.tor_proxy,
|
||||||
i2p_proxy=args.i2p_proxy,
|
i2p_proxy=args.i2p_proxy,
|
||||||
|
|||||||
@@ -19922,7 +19922,13 @@
|
|||||||
"porn",
|
"porn",
|
||||||
"us"
|
"us"
|
||||||
],
|
],
|
||||||
"checkType": "status_code",
|
"checkType": "message",
|
||||||
|
"presenseStrs": [
|
||||||
|
"user-info-section"
|
||||||
|
],
|
||||||
|
"absenceStrs": [
|
||||||
|
"User not found"
|
||||||
|
],
|
||||||
"alexaRank": 136,
|
"alexaRank": 136,
|
||||||
"urlMain": "https://xhamster.com",
|
"urlMain": "https://xhamster.com",
|
||||||
"url": "https://xhamster.com/users/{username}",
|
"url": "https://xhamster.com/users/{username}",
|
||||||
|
|||||||
Reference in New Issue
Block a user