Python auto checkout with requests

穿精又带淫゛_ 提交于 2020-01-25 08:16:07

问题


I’m trying to buy a product on the website, with a requests python’s library. For keep the cookies in the session i’m using requests.Session() and all the post requests are made with the most common headers.I’m using dev tools for reproduce the POST requests and converter it from curl to python with trillworks.com, but at the payment page i got: the cart content is changed (obv it pisn’t). My questions are: -It’s enough make a POST requests?(i’m doing in this way) -i’m reproducing only xhr requests . I'm doing it wrong? My code for keep the cookies and reproduced the common headers it the follow: What should i do? session = requests.Session() session.headers = {key:value, ...}

来源:https://stackoverflow.com/questions/58922181/python-auto-checkout-with-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!