blob: 6b2fc9ae92d8f2f01b136a89c6aef9f4165d2ed3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env python
import json
import requests
import conf
def get_client(email, password):
client = requests.session()
client.get(conf.PLATFORM_URL + 'api/csrf', verify=False,
data=json.dumps({'email': email,
'password': password}))
return client
def get_articles(client):
return client.get(conf.PLATFORM_URL + 'api/v1.0/articles/').json
|