Posting Comment Using Request

时间:2018-06-18 11:42:11

标签: python python-requests

For some reason, my script is not sending the comment to the post? Any help is appreciated :)

import requests

d = 'https://www.instagram.com/accounts/login/'

s = 'https://www.instagram.com/p/BkKZ47mhymX/'

payload = {
    'username': '****',
    'pass': '***'
}

payload1 = {
    'comments': '123',
}


with requests.Session() as session:
    post = session.post(d, data=payload)
    r = session.get(s)
    print(r.text)   #or whatever else you want to do with the request data!


post2 = session.post(s, data=payload1)

0 个答案:

没有答案