Skip to content

Instantly share code, notes, and snippets.

@cruor99
Created November 30, 2016 00:21
Show Gist options
  • Save cruor99/450c4134882d435b1e82a65424dd411a to your computer and use it in GitHub Desktop.
Save cruor99/450c4134882d435b1e82a65424dd411a to your computer and use it in GitHub Desktop.
import kivy
kivy.require('1.9.1') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.label import Label
from kivy.network.urlrequest import UrlRequest
import urllib
class MyApp(App):
def got_results(self, req, results):
print req.resp_status
print results
def build(self):
print '~' * 42
header = {"Conent-Type": "application/x-www-form-urlencoded"}
payload = {'white': 'blik', 'colors': '1', 'black': '', 'rclass': '0', 'rgroup': '2', 'variant': '0', 'comps': '0', 'result': '1', 'rtimeoperator': '1', 'gtime': '9999', 'rincoperator': '1', 'ginc': '9999', 'eco1': '', 'eco2': '', 'date-sel-after-dd': '27', 'date-sel-after-mm': '11', 'date-sel-after': '2015', 'date-sel-dd': '27', 'date-sel-mm': '11', 'date-sel': '2016', 'Games': 'Search'}
req = UrlRequest("http://www.ficsgames.org/cgi-bin/search.cgi", self.got_results, on_failure=self.got_results, on_error=self.got_results, req_body=urllib.urlencode(payload))
return Label(text='Hello world')
if __name__ == '__main__':
MyApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment