Comments (5)
Sorry but i don't know how to make pull request, i will learn
import json
import re
from holehe.core import *
from holehe.localuseragent import *
async def flickr(email, client, out):
name = "flickr"
debug = False
url = "https://www.flickr.com/services/rest/"
headers = {
'User-Agent': random.choice(ua["browsers"]["chrome"]),
'Accept': '*/*',
'Accept-Language': 'en-US',
'Connection': 'keep-alive',
'TE': 'Trailers',
}
params = {
"find_email": str(email),
"format": "json",
"api_key": "3bd7fc028a16a9d42c017814f4e91b9d",
"method": "flickr.people.findByEmail"
}
# Start API get
try:
response = await client.get(url, headers=headers, params=params)
except Exception as e:
if debug:
print("get error:\n", e)
return_error()
if debug:
print(response)
print(response.text)
# parse response to serialize
try:
regx = "^jsonFlickrApi\(({.*})\)$"
json_str = re.search(regx, response.text)[1]
data = json.loads(json_str)
except Exception as e:
if debug:
print("error, response can't be serialized:\n", e)
return_error()
# Check response
if "stat" in data:
if data["stat"] == "ok":
if "user" in data:
if "username" in data["user"]:
if "_content" in data["user"]["username"]:
out.append({
"name": name,
"rateLimit": False,
"exists": True,
"emailrecovery": None,
"phoneNumber": None,
"others": None
# "others": data["user"]["username"]["_content"]
})
# Adding a value to "other" produce the error:
# File "/home/investigator/.local/lib/python3.7/site-packages/holehe/core.py", line 124, in maincore
# toprint += " / FullName " + results["others"]["FullName"]
# TypeError: string indices must be integers
else:
if debug:
print("no _content in data[user]")
return_error()
else:
if debug:
print("no username in data")
print("data\n", data)
return_error()
elif data["stat"] == "fail":
if "code" in data:
if data["code"] == 1:
out.append({"name": name,
"rateLimit": False,
"exists": False,
"emailrecovery": None,
"phoneNumber": None,
"others": None})
elif data["code"] == 100:
if debug:
print(data["message"])
return_error()
else:
if debug:
print("unknown data stat: ", data["stat"] )
return_error()
else:
if debug:
print("No stat in data")
return_error()
def return_error():
out.append({"name": name,
"rateLimit": True,
"exists": False,
"emailrecovery": None,
"phoneNumber": None,
"others": None})
return None
from holehe.
from holehe.
Thanks you very much, the problem with your method is that if you ban the api key the module will not work anymore that's why nothing is hardcoded in holehe.
from holehe.
Thank you very much for telling me the problem is it's ok it's patch
from holehe.
from holehe.
Related Issues (20)
- Syntax error HOT 3
- [email protected] HOT 1
- > **Describe the bug**
- How to add modules/sites? Documentation? HOT 1
- Snapchat request return nothing
- Add Support for proxies HOT 1
- Discord always gives email isnt used
- ERROR when i run command pip3 install holehe HOT 1
- Publish new version
- Hhh
- rate limited HOT 2
- what command is used to get this out put ?
- Please Add a Feature that can retrieve Email used to create Instagram Accounts
- Index out of range in raidforums.py HOT 1
- Amazon false negative
- add bulk emails check
- ModuleNotFoundError on Debian : tputil
- Help
- Number lookup? HOT 1
- Unexpected keywork argument HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holehe.