Skip to content

Commit 14da70f

Browse files
authored
Merge pull request #194 from secureman/master
Add new module for Duolingo.com
2 parents 4df5bf8 + 7bb246b commit 14da70f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

holehe/modules/learning/duolingo.py

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
from holehe.core import *
2+
from holehe.localuseragent import *
3+
4+
5+
async def duolingo(email, client, out):
6+
name = "duolingo"
7+
domain = "duolingo.com"
8+
method= "other"
9+
frequent_rate_limit=False
10+
11+
12+
13+
headers = {
14+
'authority': 'www.duolingo.com',
15+
'method': 'GET',
16+
'path': '/2017-06-30/users?email=' +email,
17+
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
18+
'Accept-Encoding': 'gzip, deflate, br, zstd',
19+
'Accept-Language': 'en-US,en;q=0.8',
20+
'User-Agent': random.choice(ua["browsers"]["firefox"]),
21+
}
22+
23+
try:
24+
req = await client.get(
25+
"https://www.duolingo.com/2017-06-30/users?email="+email,)
26+
if req.json()["users"]:
27+
out.append({"name": name,"domain":domain,"method":method,"frequent_rate_limit":frequent_rate_limit,
28+
"rateLimit": False,
29+
"exists": True,
30+
"emailrecovery": None,
31+
"phoneNumber": None,
32+
"others": None})
33+
else:
34+
out.append({"name": name,"domain":domain,"method":method,"frequent_rate_limit":frequent_rate_limit,
35+
"rateLimit": False,
36+
"exists": False,
37+
"emailrecovery": None,
38+
"phoneNumber": None,
39+
"others": None})
40+
except Exception:
41+
out.append({"name": name,"domain":domain,"method":method,"frequent_rate_limit":frequent_rate_limit,
42+
"rateLimit": True,
43+
"exists": False,
44+
"emailrecovery": None,
45+
"phoneNumber": None,
46+
"others": None})

0 commit comments

Comments
 (0)