Skip to content

Commit

Permalink
fixed broken reddit exercise due to cors
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush Badoni authored and Aayush Badoni committed Mar 7, 2024
1 parent a5d4ae4 commit b1affee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _sources/lectures/TWP45/TWP45_2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ En este ejercicio vamos a acceder a Reddit para obetener datos como los de la si
import json

# La url de Reddit a la que accederemos
url = "https://cors.bridged.cc/http://www.reddit.com/r/Python/.json"
url = "https://api.reddit.com/r/Python/.json"
resp = urllib.request.urlopen(url).read()

# La respuesta se da en formato json, se debe transformar a
Expand Down
2 changes: 1 addition & 1 deletion _sources/lectures/TWP45/TWP45_2_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In this exercise we are going to access Reddit to obtain data like the one in th
import json

# The Reddit URL we'll access
url = "https://cors.bridged.cc/http://www.reddit.com/r/Python/.json"
url = "https://api.reddit.com/r/Python/.json"
resp = urllib.request.urlopen(url).read()

# The response is in JSON format, it needs to be transformed
Expand Down

0 comments on commit b1affee

Please sign in to comment.