Skip to content

Instantly share code, notes, and snippets.

@juice500ml
Created May 31, 2019 08:00
Show Gist options
  • Save juice500ml/a39be1a622ca6de8fa5320916a031470 to your computer and use it in GitHub Desktop.
Save juice500ml/a39be1a622ca6de8fa5320916a031470 to your computer and use it in GitHub Desktop.
import requests
quiz_id = '1'
score = 18
name = 'test name 11'
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'}
r = requests.get('https://grandedesafio.com/ko/quiz/' + quiz_id, headers=headers)
idx = r.text.find('<input id="key"')
key = r.text[idx+23:]
key = key[:key.find('"')]
idx = r.text.find('<title>')
name1 = r.text[idx:]
name1 = name1[7:name1.find(' - ')]
requests.post('https://api.truefalse.site/gd/addentry', json={"selected":"koaa;b,koc;b,kod;b,kof;b,kog;b,koj;b,kok;b,kom;b,kon;b,koo;b,kop;b,kor;b,kos;b,kot;b,kou;b,kov;b,kow;b,kozza;b,kozzd;b,kozzj;b", "name": name, "name1": name1, "key": key, 'quizid': quiz_id, "score": score})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment