()
| 25 | |
| 26 | |
| 27 | def 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 | |
| 38 | if __name__ == "__main__": |