Python Forum
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading json from webpage
#4
data = json.loads(r.data.decode('utf-8'))
artist_name = data['channelMetadataResponse']['currentEvent']['artist']['name']
by the way, look at requests - you can directly get response as json
http://docs.python-requests.org/en/maste...se-content
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


Messages In This Thread
Reading json from webpage - by jmair - Jan-10-2019, 06:15 PM
RE: Reading json from webpage - by stullis - Jan-10-2019, 06:40 PM
RE: Reading json from webpage - by jmair - Jan-10-2019, 08:52 PM
RE: Reading json from webpage - by buran - Jan-10-2019, 09:04 PM
RE: Reading json from webpage - by jmair - Jan-10-2019, 09:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeRoor reading json GreenLynx 3 909 May-16-2023, 01:47 PM
Last Post: buran
  Reading Data from JSON tpolim008 2 1,129 Sep-27-2022, 06:34 PM
Last Post: Larz60+
  Initializing, reading and updating a large JSON file medatib531 0 1,814 Mar-10-2022, 07:58 PM
Last Post: medatib531
  Help with reading json file hhchenfx 5 4,543 Jul-07-2021, 01:58 PM
Last Post: hhchenfx
  reading json file DrBrownStats 1 1,847 Nov-25-2020, 09:00 AM
Last Post: Larz60+
  Reading a json file ebolisa 2 2,183 Mar-15-2020, 09:24 AM
Last Post: ebolisa
  Reading json behind a login page ebolisa 3 2,477 May-26-2019, 05:15 PM
Last Post: heiner55
  Reading JSON - error jmair 2 2,264 May-22-2019, 07:25 PM
Last Post: jmair
  [split] Reading json from webpage rajesh1997 1 2,229 Feb-05-2019, 12:07 PM
Last Post: buran
  Reading complex JSON dictionaries Gromis 5 3,886 Jul-08-2018, 10:26 PM
Last Post: Gromis

Forum Jump:

User Panel Messages

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