Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6536083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:26:57+00:00 2026-05-25T10:26:57+00:00

I want to create a script in Python which downloads the current KML files

  • 0

I want to create a script in Python which downloads the current KML files of all the Maps I created on Google Maps.

To do so manually, I can use this:

http://maps.google.com.br/maps/ms?msid=USER_ID.MAP_ID&msa=0&output=kml

where USER_ID is a constant number Google uses to identify me, and MAP_ID is the individual map identifier generated by the link icon on top-right corner.

This is not very straightforward, because I have to manually browse “My Places” page on Google Maps, and get the links one by one.

From Google Maps API HTTP Protocol Reference:

The Map Feed is a feed of user-created maps.

This feed’s full GET URI is:

http://maps.google.com/maps/feeds/maps/default/full

This feed returns a list of all maps for the authenticated user.

** The page says this service is no longer available, so I wonder if there is a way to do the same in the present.

So, the question is: Is there a way to get/download the list of MAP_IDs of all my maps, preferrably using Python?

Thanks for reading

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:26:58+00:00Added an answer on May 25, 2026 at 10:26 am

    The correct answer to this question involves using Google Maps Data API, HTML interface, which by the way is deprecated but still solves my need in a more official way, or at least more convincing than parsing a web page. Here it goes:

    # coding: utf-8
    
    import urllib2, urllib, re, getpass
    
    username = 'heltonbiker'
    senha = getpass.getpass('Senha do usuário ' + username + ':')
    
    dic = {
            'accountType':      'GOOGLE',
            'Email':            (username + '@gmail.com'),
            'Passwd':           senha,
            'service':          'local',
            'source':           'helton-mapper-1'
            }
    url = 'https://www.google.com/accounts/ClientLogin?' + urllib.urlencode(dic)
    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')
    request.add_header('Authorization', 'GoogleLogin auth=%s' % authid)
    source = urllib2.urlopen(request).read()
    
    for link in re.findall('<link rel=.alternate. type=.text/html. href=((.)[^\1]*?)>', source):
        s = link[0]
        if 'msa=0' in s:
            print s
    

    I arrived with this solution with a bunch of other questions in SO, and a lot of people helped me a lot, so I hope this code might help anyone else trying to do so in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create application to fetch the current location data using Java script.
I want to create a script that parses or makes sense of apache's error
I want to create an allocator which provides memory with the following attributes: cannot
Application running in django, apache, python and mysql: I want to create global variable
I have a row of buttons, which all create a pdf file which I
I want port some my Python scripts into web apps so that others can
If all tables I want to delete from have the column gamer_id can i
I have created a little Python egg (with setuptools) that I want to install
I want to create a script that does the following: When answering questions via
I have a Silverlight solution that I want to create a build script for.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.