Skip to content

Commit

Permalink
Fixed xHamster, added support of proxies to self-check mode (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
soxoj authored Dec 10, 2021
1 parent 4880b71 commit 262f97c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion maigret/checking.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ async def site_self_check(
semaphore,
db: MaigretDatabase,
silent=False,
proxy=None,
tor_proxy=None,
i2p_proxy=None,
):
Expand All @@ -789,6 +790,7 @@ async def site_self_check(
forced=True,
no_progressbar=True,
retries=1,
proxy=proxy,
tor_proxy=tor_proxy,
i2p_proxy=i2p_proxy,
)
Expand Down Expand Up @@ -845,6 +847,7 @@ async def self_check(
logger,
silent=False,
max_connections=10,
proxy=None,
tor_proxy=None,
i2p_proxy=None,
) -> bool:
Expand All @@ -859,7 +862,7 @@ def disabled_count(lst):

for _, site in all_sites.items():
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)
tasks.append(future)
Expand Down
1 change: 1 addition & 0 deletions maigret/maigret.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ async def main():
db,
site_data,
logger,
proxy=args.proxy,
max_connections=args.connections,
tor_proxy=args.tor_proxy,
i2p_proxy=args.i2p_proxy,
Expand Down
8 changes: 7 additions & 1 deletion maigret/resources/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -19922,7 +19922,13 @@
"porn",
"us"
],
"checkType": "status_code",
"checkType": "message",
"presenseStrs": [
"user-info-section"
],
"absenceStrs": [
"User not found"
],
"alexaRank": 136,
"urlMain": "https://xhamster.com",
"url": "https://xhamster.com/users/{username}",
Expand Down

0 comments on commit 262f97c

Please sign in to comment.