What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-23 06:40:51
check if string is url python
#USE requests.get() TO CHECK IF A STRING IS A URL try: response = requests.get("http://www.avalidurl.com/") print("URL is valid and exists on the internet") except requests.ConnectionError as exception: print("URL doe... Add solution -
Python 2021-09-06 00:22:02
save request response json to file python
import requests # there is inbuilt json() constructor for requests.get() method json_data = requests.get("https://api.blinkist.com/v4/books/5420831a63656400089f0000").json() print(json_data) # To actually write the data to the file, we just cal... Add solution