Python Forum
Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
installing json
#4
Well, here's my code, I just get an:

Error:
{'error': 'not found'}
as a reponse.

import urllib.parse
import requests

main_api = 'https://api.guildwars2.com/v2/achievements'

address = 'achievements'
url = main_api + urllib.parse.urlencode({'address': address})

json_data = requests.get(url).json()
print(json_data)

I just figured out it wasn't the code that wasn't working, it was a typo in the way the API processes requests. Well, step one down. Many more to go. Sorry about the flacid question guys.
Reply


Messages In This Thread
installing json - by Only_On_Tuesdays - Sep-01-2017, 09:23 PM
RE: installing json - by metulburr - Sep-01-2017, 09:46 PM
RE: installing json - by snippsat - Sep-01-2017, 09:47 PM
RE: installing json - by Only_On_Tuesdays - Sep-01-2017, 10:06 PM
RE: installing json - by metulburr - Sep-02-2017, 03:37 AM
RE: installing json - by snippsat - Sep-02-2017, 11:04 AM
RE: installing json - by Only_On_Tuesdays - Sep-02-2017, 03:13 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020