softcoder24 / insta_share

Share a post into your Instagram account using the requests library.
Other
27 stars 10 forks source link

Fixed csrf_token login problem #10

Closed bejgli closed 1 year ago

bejgli commented 1 year ago

Instagram changed how they handle csrf tokens, and getting it from cookies is not possible anymore. We can get the csrf token from the page with regex. The token is only visible if we use an User-Agent header in the get request.