我们的网站几乎每天都会更新。每次添加新页面时,我们都需要将站点地图更新给谷歌网站管理员。
我们已经尝试使用 ping_google() 以及所需的一组参数和 google,它似乎永远不会更新网站管理员上的站点地图。为了记录响应,我们重写了函数并记录了下面给出的响应:
2010-10-01 09:00:02,489 DEBUG Sitemap Response: <html><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<head><title>Google Webmaster Tools
-
Sitemap Notification Received</title>
<meta name="robots" content="noindex, noodp">
<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-18009-2";
_utcp="/webmasters/";
_uanchor=1;
urchinTracker();
</script></head>
<body><h2>Sitemap Notification Received</h2>
<br>
Your Sitemap has been successfully added to our list of Sitemaps to crawl. If this is the first time you are notifying Google about this Sitemap, please add it via <a href="http://www.google.com/webmasters/tools/">http://www.google.com/webmasters/tools/</a> so you can track its status. Please note that we do not add all submitted URLs to our index, and we cannot make any predictions or guarantees about when or if they will appear.</body></html>
反应似乎很好。但是站点地图永远不会在网站管理员上更新。我们正在使用 django 1.1。除了 ping_google() 之外,还有其他方法可以更新网站管理员上的站点地图吗