source: products/qPloneGoogleSitemaps/branches/contenttype/utils.py @ 447

Last change on this file since 447 was 425, checked in by fenix, 18 years ago

added missed file

File size: 372 bytes
Line 
1from urllib2 import urlopen
2from urllib  import quote as urlquote
3
4from OFS.ObjectManager import BadRequestException
5
6def ping_google(url, sitemap_id):
7    """Ping sitemap to Google"""
8    sitemap_url = urlquote(url + "/" + sitemap_id)
9    g = urlopen('http://www.google.com/webmasters/sitemaps/ping?sitemap='+sitemap_url)
10    result = g.read()
11    g.close()
12    return 0
Note: See TracBrowser for help on using the repository browser.