gpt4 book ai didi

seo - 让谷歌站点地图生成器工作 : "[ERROR] When attempting to access your generated Sitemap ... we failed to read it. "

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:36:35 24 4
gpt4 key购买 nike

我正在尝试获取 Google Sitemap Generator工作。

这是我的(Zend Framework 2)项目结构:

/
/...
/public/...
/public/sitemap.xml
/public/urllist.txt
/...
/temp/googlesitemapgen/
/temp/googlesitemapgen/config.xml
/temp/googlesitemapgen/sitemap_gen.py
/...

config.xml

<?xml version="1.0" encoding="UTF-8" ?>
<site
base_url="http://foo.bar.loc"
store_into="/var/www/bar/foo/public/sitemap.xml"
verbose="3"
suppress_search_engine_notify="0"
>
<urllist path="/var/www/bar/foo/public/urllist.txt" encoding="UTF-8" />
</site>

urllist.txt

http://foo.bar.loc

当我调用生成脚本时

user@machine:/var/www/bar/foo/temp/googlesitemapgen# python sitemap_gen.py --config=config.xmlthon sitemap_gen.py --config=config.xml

发生错误:

user@machine:/var/www/bar/foo/temp/googlesitemapgen# python sitemap_gen.py --config=config.xml 
sitemap_gen.py:65: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Reading configuration file: config.xml
BaseURL is set to: http://foo.bar.loc/
Input: From URLLIST "/var/www/bar/foo/public/urllist.txt"
Opened URLLIST file: /var/www/bar/foo/public/urllist.txt
[WARNING] Discarded URL for not starting with the base_url: http://foo.bar.loc
[WARNING] No URLs were recorded, writing an empty sitemap.
Sorting and normalizing collected URLs.
Writing Sitemap file "/var/www/bar/foo/public/sitemap.xml" with 0 URLs
Notifying search engines.
[ERROR] When attempting to access our generated Sitemap at the following URL:
http://foo.bar.loc/sitemap.xml
we failed to read it. Please verify the store_into path you specified in
your configuration file is web-accessable. Consult the FAQ for more
information.
[WARNING] Proceeding to notify with an unverifyable URL.
Notifying: www.google.com
Notification URL: http://www.google.com/webmasters/sitemaps/ping?sitemap=http%3A%2F%2Ffoo.bar.loc%2Fsitemap.xml
Number of errors: 1
Number of warnings: 3

文档的“Troubleshooting”部分描述了此错误。但我已经检查了 base_urlstore_into - 两者都设置正确。

为什么现在会出现这个错误?我做错了什么吗?什么?如何让工具工作?

谢谢

最佳答案

您需要一个包含实际 url 的 urllist.txt。网站生成器不会为您搜索/抓取您的网站。它可以检查 Apache 日志或引用其他生成的站点地图,但它本身不会抓取。

查看我的回答:

https://webmasters.stackexchange.com/questions/47085/is-there-an-xml-sitemap-generator-with-command-line-interface-for-nginx-on-linux/47105#47105

我有一个命令字符串可以通过抓取给定站点生成 url 列表。

关于seo - 让谷歌站点地图生成器工作 : "[ERROR] When attempting to access your generated Sitemap ... we failed to read it. ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15905665/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com