#130 Ajouté par Tgwaste il y a 9 ans
---
#131 Ajouté par Karu il y a 9 ans
Any chance? :)
#132 Ajouté par Karu il y a 8 ans
#133 Ajouté par Siela il y a 8 ans
#134 Ajouté par Karu il y a 8 ans
would it be possible to add <faction> like there is <race> ?
and less probable, API for OP wars?
#135 Ajouté par Nudge il y a 6 ans
#136 Ajouté par Karu il y a 6 ans
Anyone wrote Python or C code that uses GET for the XMLs?
#137 Ajouté par Nudge il y a 5 ans
#138 Ajouté par Laoviel il y a 5 ans
#139 Ajouté par Nudge il y a 5 ans
import sys
import xml.etree.ElementTree as ET
import requests
RYZ_API_ENDPOINT = "http://api.ryzom.com/character.php"
ryz_api_key = "abracadabraverylongcodewithnumbersandlettersstuff"
RYZ_PARAMS = {'apikey': ryz_api_key}
r = requests.get(url = RYZ_API_ENDPOINT, params = RYZ_PARAMS)
print(r.status_code)
print(r.status_code == requests.codes.ok)
print(r.headers['content-type'])
print(r.encoding)
print(r.url)
ryz_toon = ET.parse(r.text)
for elem in ryz_toon.iter():
print ("%s: '%s'\n\r", elem.tag, elem.text)
Dernière édition par Nudge (il y a 5 ans).
#140 Ajouté par Laoviel il y a 5 ans
import sysimport requestsfrom bs4 import BeautifulSoupurl = "http://api.ryzom.com/character.php?apikey=xxxxxxxxxx"r = requests.get(url)data = r.textsoup = BeautifulSoup(data, 'xml')#find all itemsitems = soup.find("fame").find_all()for item in items: print(item.name+" "+item.text+"\n")
Edité 2 fois | Dernière édition par Laoviel (il y a 5 ans).
#141 Ajouté par Tgwaste il y a 2 ans
Dernière édition par Tgwaste (il y a 2 ans).
powered by ryzom-api