Skip to content

Instantly share code, notes, and snippets.

Created December 31, 2017 13:29
What would you like to do?
automated push
#!/usr/bin/env python3
import sys
import requests
if __name__ == '__main__':
s = requests.session()
for line in sys.stdin.readlines():
name,uuid,comment = line.strip().split('\t')
url = '{}'.format(uuid)
r = s.get(url)
csrfmiddlewaretoken = r.text.split("csrfmiddlewaretoken' value='")[1].split("'")[0]
r ='',headers={'Referer':url},data={
'author':'automated push',
print('{} {}'.format(uuid,name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment