Python Request for JSON file returns None -
from fake_useragent import useragent import requests ua = useragent() header = {'user-agent':str(ua.chrome)} d = {"query": "/api/v2/details/ip/", "query_entry": "41.219.127.69"} r = requests.get("https://talosintelligence.com/sb_api/query_lookup/", data = d, headers=header)
when run same result main site "talosintelligence.com" , @ network counsel, exact url responds json file get
request python returns none
.
i got work setting referer
header..
import requests sess = requests.session() ip_addr = "41.219.127.69" ret = sess.get('https://talosintelligence.com/sb_api/query_lookup', data={"query": "/api/v2/details/ip/", "query_entry": ip_addr, "offset": 0, "order": "ip asc"}, headers={'user-agent': 'mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, gecko) chrome/61.0.3163.31 safari/537.36', 'referer': 'https://talosintelligence.com/reputation_center/lookup?search=' + ip_addr})
Comments
Post a Comment