title: How to print json data from url to excel?
body: <pre><code>import urllib 
  import json
  import re
  import csv
  from bs4 import BeautifulSoup
  
  game_code = open("/Users//Desktop/PYTHON/gc.txt").read()
  
  game_code = game_code.split("\r")
  
  
  for gc in game_code:
  
      htmltext =urllib.urlopen("http://cluster.leaguestat.com/feed/index.php?feed=gc&amp;key=f109cf290fcf50d4&amp;client_code=ohl&amp;game_id="+gc+"&amp;lang_code=en&amp;fmt=json&amp;tab=pxpverbose")
  
      soup= BeautifulSoup(htmltext, "html.parser")
      j= json.loads(soup.text)
      summary = ['GC'],['Pxpverbose']
      for event in summary:
          print gc, ["event"]
  </code></pre>
  
  <p>I can not seem to access the lib to print the proper headers and row. I ultimately want to export specific rows to csv. I downloaded python 2 days ago, so i am very new. I needed this one data set for a project. Any advice or direction would be greatly appreciated.</p>
  
  <p>Here are a few game codes if anyone wanted to take a look. Thanks</p>
  
  <p>21127,20788,20922,20752,21094,21196,21295,21159,21128,20854,21057</p>