دنبال کننده ها

۱۳۹۶ آذر ۱۲, یکشنبه

security - Python request keeps giving 401

[ad_1]



im trying to make this request that i acquired from charles proxy for the apple app "Footpatrol". im trying to obtain the information on this page. any help would be greatly appreciated.



import requests

def main():
headers =
'Host': 'prod.jdgroupmesh.cloud',
'Accept': '*/*',
'X-API-Key': '3EEA534D279C4CE393C19901BABD9DCA',
'X-Request-Auth': 'Hawk id="baea251317", mac="dk7ySoREnt8/FK32EKnZlDX1kvA5/Y/9TPSIL09SMfg=", ts="1512360933", nonce="4AM7R2"',
'X-Debug': '1',
'Accept-Language': 'en-us',
'User-Agent': 'JDSports/3.0.1.549 CFNetwork/889.9 Darwin/17.2.0',
'MESH-Commerce-Channel': 'iphone-app',


params = (
('channel', 'iphone-app'),
('expand', 'variations,informationBlocks,customisations'),
)

r = requests.get('https://prod.jdgroupmesh.cloud/stores/footpatrol/products/294185', headers=headers, params=params)

print r.status_code
print r.text
main()



[ad_2]

لینک منبع