Google-Forms response with Python? -


i'm trying write python-script makes possible submit responses in google-forms one: https://docs.google.com/forms/d/152ctd4vy9prvlfeacof6smmtfap1cl750sx72rh6hj8/viewform

but how send post , how can find out, post should contain?

first pip install requests

you have post specific form data specific url,you can use requests.the form_data dict params correspondent options,if don't need options,just remove form_data.

import requests url = 'https://docs.google.com/forms/d/152ctd4vy9prvlfeacof6smmtfap1cl750sx72rh6hj8/formresponse' form_data = {'entry.2020959411':'18+ sollte absolute pflicht sein',             'entry.2020959411':'alter sollte garkeine rolle spielen',             'entry.2020959411':'17+ wäre für mich vertretbar',             'entry.2020959411':'16+ wäre für mich vertretbar',             'entry.2020959411':'15+ wäre für mich vertretbar',             'entry.2020959411':'ausnahmen von der regel - dafür?',             'entry.2020959411':'ausnahmen von der regel - dagegen?',             'entry.2020959411':'__other_option__',             'entry.2020959411.other_option_response':'test',             'draftresponse':[],             'pagehistory':0} user_agent = {'referer':'https://docs.google.com/forms/d/152ctd4vy9prvlfeacof6smmtfap1cl750sx72rh6hj8/viewform','user-agent': "mozilla/5.0 (x11; linux i686) applewebkit/537.36 (khtml, gecko) chrome/28.0.1500.52 safari/537.36"} r = requests.post(url, data=form_data, headers=user_agent) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -