Python Forum
[split] Reading json from webpage
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Reading json from webpage
#1
#
# url is defined above.
#
jsonurl = urlopen(url)

#
# While trying to debug, I put this in:
#
print jsonurl

#
# Was hoping text would contain the actual json crap from the URL, but seems not...
#
text = json.loads(jsonurl)
print text
Reply
#2
Please post minimal, complete and verifiable example. Post your code in python tags.
What is the output you get?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeRoor reading json GreenLynx 3 800 May-16-2023, 01:47 PM
Last Post: buran
  [split] Parse Nested JSON String in Python mmm07 4 1,428 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Reading Data from JSON tpolim008 2 1,032 Sep-27-2022, 06:34 PM
Last Post: Larz60+
  Python Split json into separate json based on node value CzarR 1 5,476 Jul-08-2022, 07:55 PM
Last Post: Larz60+
  Initializing, reading and updating a large JSON file medatib531 0 1,724 Mar-10-2022, 07:58 PM
Last Post: medatib531
  Help with reading json file hhchenfx 5 4,407 Jul-07-2021, 01:58 PM
Last Post: hhchenfx
  reading json file DrBrownStats 1 1,791 Nov-25-2020, 09:00 AM
Last Post: Larz60+
  [split] script: remove all "carriage return" from my json variable pete 2 2,744 May-05-2020, 03:22 PM
Last Post: deanhystad
  Reading a json file ebolisa 2 2,113 Mar-15-2020, 09:24 AM
Last Post: ebolisa
  Split of key from JSON response aswini_dubey 1 2,362 Dec-04-2019, 06:54 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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