问题
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