MCPcopy Create free account
hub / github.com/LinkedInLearning/learning-python-2896241 / main

Function main

Ch5 - Internet Data/jsondata_start.py:27–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def main():
28 # define a variable to hold the source URL
29 # In this case we'll use the free data feed from the USGS
30 # This feed lists all earthquakes for the last day larger than Mag 2.5
31 urlData = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson"
32
33 # Open the URL and read the data
34 webUrl = urllib.request.urlopen(urlData)
35 print ("result code: " + str(webUrl.getcode()))
36
37
38if __name__ == "__main__":

Callers 1

jsondata_start.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected