title: How to scrape football results from sofascore using python
body: <p>I am working on this project on Python 3.8. I have to download data into a Pandas Dataframe and ultimately write to a databse (SQL or Access) for all premier league teams for 2018 &amp; 2019. I am trying to use beautifulsoup for that.
  I have a code that works with soccerbase.com but it does not work on sofascore.com @oppressionslayer has helped with the code so far.
  Can anybody please help me?</p>
  
  <pre><code>import json
  
  import pandas as pd
  import requests
  from bs4 import BeautifulSoup as bs
  
  url = "https://www.sofascore.com/football///json"
  r = requests.get(url)
  soup = bs(r.content, 'lxml')
  json_object = json.loads(r.content)
  
  json_object['sportItem']['tournaments'][0]['events'][0]['homeTeam']['name']
  # 'Sheffield United'
  
  json_object['sportItem']['tournaments'][0]['events'][0]['awayTeam']['name']  # 'Manchester United'
  
  json_object['sportItem']['tournaments'][0]['events'][0]['homeScore']['current']
  # 3
  
  json_object['sportItem']['tournaments'][0]['events'][0]['awayScore']['current']
  
  print(json_object)
  </code></pre>
  
  <p>How do I loop this code to get the entire universe of teams?
  My aim is to get every team data with rows as ["Event date", "Competition", "Home Team", "Home Score", "Away Team", "Away Score", "Score"]
  e.g. 31/10/2019 Premier League Chelsea 1 Manchester United 2 1-2 </p>
  
  <p>I am a sarter and how can I get it?</p>