mirror of
https://github.com/sherlock-project/sherlock
synced 2025-02-16 20:48:27 +00:00
Merge branch 'pr/n256_irazasyed'. Use minimal addiotional request header required for Zomato to be happy.
This commit is contained in:
commit
1f38d5372b
2 changed files with 16 additions and 4 deletions
12
data.json
12
data.json
|
@ -1500,5 +1500,15 @@
|
|||
"urlMain": "https://segmentfault.com/",
|
||||
"username_claimed": "bule",
|
||||
"username_unclaimed": "noonewouldeverusethis7"
|
||||
},
|
||||
"Zomato": {
|
||||
"errorType": "status_code",
|
||||
"url": "https://www.zomato.com/{}/foodjourney",
|
||||
"urlMain": "https://www.zomato.com/",
|
||||
"username_claimed": "deepigoyal",
|
||||
"username_unclaimed": "noonewouldeverusethis7",
|
||||
"headers" : {
|
||||
"Accept-Language": "en-US,en;q=0.9"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,13 +189,15 @@ def sherlock(username, site_data, verbose=False, tor=False, unique_tor=False, pr
|
|||
|
||||
# Record URL of main site
|
||||
results_site['url_main'] = net_info.get("urlMain")
|
||||
|
||||
# A user agent is needed because some sites don't return the correct information since they think that
|
||||
# we are bots
|
||||
|
||||
# A user agent is needed because some sites don't return the correct
|
||||
# information since they think that we are bots (Which we actually are...)
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0',
|
||||
}
|
||||
|
||||
if "headers" in net_info:
|
||||
#Override/append any extra headers required by a given site.
|
||||
headers.update(net_info["headers"])
|
||||
|
||||
# Don't make request if username is invalid for the site
|
||||
|
|
Loading…
Add table
Reference in a new issue