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
RevLine 
[1]1from urllib2 import urlopen
2from urllib  import quote as urlquote
[423]3
[425]4from OFS.ObjectManager import BadRequestException
5
[414]6def ping_google(url, sitemap_id):
[1]7    """Ping sitemap to Google"""
[414]8    sitemap_url = urlquote(url + "/" + sitemap_id)
[1]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.