14
edits
m |
m |
||
Line 16: | Line 16: | ||
<syntaxhighlight lang="python3" line="1"> | <syntaxhighlight lang="python3" line="1"> | ||
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||
#List course of fun | |||
import requests | import requests | ||
import json | import json | ||
Line 22: | Line 22: | ||
url = "https://www.fun-mooc.fr/api/courses/v1/courses/" | url = "https://www.fun-mooc.fr/api/courses/v1/courses/" | ||
data={"pagination" : { "next" :url } } | data={"pagination" : { "next" :url } } | ||
while data["pagination"]["next"] != None: | while data["pagination"]["next"] != None: | ||
r = requests.get(data["pagination"]["next"]) | r = requests.get(data["pagination"]["next"]) |
edits