-2

I want to parse data from a website that has all universities listed in something like this

{
    "web_pages": [
      "http://www.marywood.edu"
    ],
    "name": "Marywood University",
    "alpha_two_code": "PA",
    "state-province": null,
    "domains": [
      "marywood.edu"
    ],
    "country": "United States"
  }

How can I add each university name to a list and its country code too?

  • If it helps, that's JSON data which you could parse with [`json`](https://docs.python.org/3/library/json.html) from the stdlib – wjandrea Jul 21 '19 at 15:39
  • Partial duplicate: [Parse JSON in Python](https://stackoverflow.com/q/7771011/4518341) – wjandrea Jul 21 '19 at 15:52

1 Answers1

1

You should learn the basics of webbrowser, requests and bs4. You can also read Chapter 11 of "Automate The Boring Stuff with Python" by Al Swigart, which gives detailed explanations of everything needed.

peki
  • 669
  • 7
  • 24