Last change
on this file since 446 was
425,
checked in by fenix, 18 years ago
|
added missed file
|
File size:
372 bytes
|
Line | |
---|
1 | from urllib2 import urlopen |
---|
2 | from urllib import quote as urlquote |
---|
3 | |
---|
4 | from OFS.ObjectManager import BadRequestException |
---|
5 | |
---|
6 | def 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.