title: How to get list of my places from Google Maps programmatically?
body: <p>I am making a web app which is using Google Maps API v3. I want to display some places on the map which are stored on the user's Google account's "My Places" section on Google Maps.</p>
  
  <p>I know that google Maps API support KML and I can download KML from Google Maps My Places.
  But I want to do this programmatically.</p>
  
  <p>Example:</p>
  
  <p>A user comes to my website, log in using his/her Google credentials and they can see the list of their saved places. After clicking on one of them, that place will appear on the map which is on my web app.</p>
  
  <p>Please suggest how I go about it.</p>
  
  <p>I found this <a href="https://stackoverflow.com/questions/11930287/access-locations-in-my-places-of-a-particular-account-through-google-maps-api">Access locations in My Places of a particular account through Google Maps API</a> and tried it this way:</p>
  
  <pre><code>import urllib2, urllib, re, getpass
  
  username = 'abhishekworld'
  senha = getpass.getpass('password' + username + ':')
  
  dic = {
          'accountType':      'GOOGLE',
          'Email':            (username + '@gmail.com'),
          'Passwd':           senha,
          'service':          'local',
          'source':           'themappers'
          }
  url = 'https://www.google.com/accounts/ClientLogin?' + urllib.urlencode(dic)
  print url
  output = urllib2.urlopen(url).read()
  authid = output.strip().split('\n')[-1].split('=')[-1]
  
  request = urllib2.Request('http://maps.google.com/maps/feeds/maps/default/full?access_token='+authid)
  request.add_header('Authorization', 'GoogleLogin auth=%s' % authid)
  source = urllib2.urlopen(request).read()
  open('feed.xml','w').write(source)
  for link in re.findall('&lt;link rel=.alternate. type=.text/html. href=((.)[^\1]*?)&gt;', source):
      s = link[0]
      if 'msa=0' in s:
          msid = s.split(";")[-1]
          print "https://maps.google.com/maps/ms?authuser=0&amp;vps=2&amp;ie=UTF8&amp;msa=0&amp;output=kml&amp;"+msid
  </code></pre>
  
  <p>Although this works fine, after a few logins, Google sends you an email saying "suspicious activity reported", so I need a clean solution. Please let me know if there is any clean way to do this.</p>