blob: da6b1727f22150dc558c9f5a7fae8c33c5714748 (
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
URL = 'domain.net'
def get_client(email, password):
client = requests.session()
client.get(URL + 'api/csrf', verify=False,
data=json.dumps({'email': email,
'password': password}))
return client
def get_articles(client):
return client.get(URL + 'api/v1.0/articles/').json
|