Quote:
Originally Posted by Grue
I'm too dumb to understand go but I'd assume you do something like
Send post to log in with username and password
Take token data from set cookie response headers or response body or whatever
Then use that token to do a post to post the contents of the tweet to the politics thread id
Every time? you don't persist the login token/info anywhere right?
I persist the login cookies (which I think are valid for ~a year?), but not the security token (which I found out the hard way expires fairly quickly).
What you described is correct for the first run, where I don't have saved cookies yet. For future runs, I...
- load cookies that I previously saved to json file
- load random 2+2 page to get security token (I set it to the PM homepage, as Chips Ahoy's code had, but most/all pages you load will have the token embedded in them for you to grab)
- submit post