Python Forum
python requests library .JSON() error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python requests library .JSON() error
#2
If you want json, ask for json. You are asking for text.
import requests
url="https://www.google.com/"
response=requests.get(url)  # Leave as a reply
print(response.text)  # If you want to see text
print(response.json())  # If you want to see json
Reply


Messages In This Thread
RE: python requests library .JSON() error - by deanhystad - Dec-19-2022, 07:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  json loads throwing error mpsameer 8 1,010 Jan-23-2024, 07:04 AM
Last Post: deanhystad
  Error in blend_modes library talgreen 6 1,219 Jul-01-2023, 05:32 PM
Last Post: talgreen
  json decoding error deneme2 10 4,383 Mar-22-2023, 10:44 PM
Last Post: deanhystad
  Read nested data from JSON - Getting an error marlonbown 5 1,611 Nov-23-2022, 03:51 PM
Last Post: snippsat
  Python Split json into separate json based on node value CzarR 1 6,125 Jul-08-2022, 07:55 PM
Last Post: Larz60+
Question I am struggling with basic json library + sql alchemy w/ mariadb-connector json ->sql BrandonKastning 0 1,625 Mar-04-2022, 09:26 PM
Last Post: BrandonKastning
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 11,046 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Python requests oauth2 access token herobpv 6 4,249 Sep-27-2021, 06:54 PM
Last Post: herobpv
  Error about parser library and tree builder Led_Zeppelin 8 12,155 Jun-11-2021, 08:53 PM
Last Post: snippsat
  JSON Decode error when using API to create dataframe Rubstiano7 4 3,133 Jan-11-2021, 07:52 PM
Last Post: buran

Forum Jump:

User Panel Messages

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