Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_post(th, iden, solution, comment):
- rq = requests.post(BASE + "/user/posting",
- data={
- 'board': BOARD,
- 'thread': th,
- 'comment': comment,
- 'captcha_type': '2chcaptcha',
- '2chcaptcha_id': iden,
- '2chcaptcha_value': solution,
- },
- files=[])
- return json.loads(rq.text)
- # {'error': {'code': 666, 'message': 'Внутренняя ошибка сервера, повторите запрос позже.'}, 'result': 0}
- def create_post(th, iden, solution, comment):
- rq = requests.post(BASE + "/user/posting",
- data={
- 'board': BOARD,
- 'thread': th,
- 'comment': comment,
- 'captcha_type': '2chcaptcha',
- '2chcaptcha_id': iden,
- '2chcaptcha_value': solution,
- },
- files=[('file[]', open('...', 'rb'))])
- return json.loads(rq.text)
- # OK
Advertisement
Add Comment
Please, Sign In to add comment