如何创建站点地图/列表

时间:2021-11-18 11:33:41

I need to create a site map/list, but I need the link-name to show up as well.

我需要创建一个站点地图/列表,但我也需要显示链接名称。

What I mean by that is given, say, www.google.com, I need the following list to be created.

我的意思是,www.google.com,我需要创建以下列表。

Google - www.google.com
Images - http://images.google.com/imghp?hl=en&tab=wi
...
My Account - http://images.google.com/imghp?hl=en&tab=wi
    Personal Information Edit - https://www.google.com/accounts/EditUserInfo
    ...
    My Products - https://www.google.com/accounts/EditServices
...
Privacy - http://www.google.com/intl/en/privacy.html
...

The list needs to be bound to a domain, say us.example.com.

该列表需要绑定到域,例如us.example.com。

I have tried a depth first search using a python script, with Beautiful Soup to parse the links. This was unsuccessful.

我尝试使用python脚本进行深度优先搜索,使用Beautiful Soup来解析链接。这是不成功的。

Anybody have any ideas on how they would do it?

有人对他们如何做到这一点有任何想法吗?

3 个解决方案

#1


0  

A very simple sitemap can be a file called

一个非常简单的站点地图可以是一个名为的文件

sitemap.txt

http://website.com/index.php
http://website.com/about.php
http://website.com/blog.php

If you need to 'scrape' your own website for all your links you probably have setup your website in a wrong way :(

如果您需要“刮”您自己的网站以获取所有链接,您可能以错误的方式设置了您的网站:(

In most languages you could try either a file / direction iteration, if your using a database it should be even easier as you can just reproduce all the links at once by tweaking the way you create urls just a bit to output a sitemap.txt (or if you have more then 50 / 100 urls you might want to generate an XML)

在大多数语言中,您可以尝试文件/方向迭代,如果您使用数据库它应该更容易,因为您可以通过调整创建URL的方式一次性地重现所有链接以输出sitemap.txt(或者,如果您有超过50/100的URL,则可能需要生成XML)

If you need help with creating a file iterator you might want to give some more information about which language would suite you best, as a decent PHP solution might not help at all if your writing everything in python.

如果您需要有关创建文件迭代器的帮助,您可能希望提供更多关于哪种语言最适合您的信息,因为如果您在python中编写所有内容,一个不错的PHP解决方案可能根本无济于事。

#2


0  

If you're looking for an automated web service to create the sitemap for you, you can use some of the following:

如果您正在寻找自动化Web服务来为您创建站点地图,则可以使用以下某些功能:

  1. http://www.web-site-map.com/xml_sitemap.php
  2. www.xml-sitemaps.com
  3. www.sitemapdoc.com

You can find a list of services here too: https://code.google.com/p/sitemap-generators/wiki/SitemapGenerators

您也可以在此处找到服务列表:https://code.google.com/p/sitemap-generators/wiki/SitemapGenerators

Good luck!

#3


0  

  1. Go to the XML Sitemap builder
  2. 转到XML Sitemap构建器

  3. Enter the homepage path of your website (e.g. www.mydomain.com)
  4. 输入您网站的主页路径(例如www.mydomain.com)

  5. Enter the change frequency of your website (be honest ;)
  6. 输入您网站的更改频率(说实话;)

  7. Leave the rest as it is and click on start to let the tool make your sitemap
  8. 保持原样并单击开始让工具制作您的站点地图

  9. When it is done download the compressed XML Sitemap version (.gz) and copy it to your root folder
  10. 完成后,下载压缩的XML Sitemap版本(.gz)并将其复制到根文件夹

  11. You can open the file with an text-editor of your choise and change the priority of documents you think. You can use and value between 0.1 and 0.9, but be aware to only give really important sites the higher value.
  12. 您可以使用选择的文本编辑器打开文件,并更改您认为的文档的优先级。您可以使用0.1到0.9之间的值,但要注意只为真正重要的站点提供更高的值。

  13. The following is very important, so that all search engine bots will know you have a sitemap. Create a new file called
  14. 以下内容非常重要,因此所有搜索引擎机器人都知道您有站点地图。创建一个名为的新文件

[Source: How To Create a Google Sitemap in 5 Minutes]

[来源:如何在5分钟内创建Google Sitemap]

#1


0  

A very simple sitemap can be a file called

一个非常简单的站点地图可以是一个名为的文件

sitemap.txt

http://website.com/index.php
http://website.com/about.php
http://website.com/blog.php

If you need to 'scrape' your own website for all your links you probably have setup your website in a wrong way :(

如果您需要“刮”您自己的网站以获取所有链接,您可能以错误的方式设置了您的网站:(

In most languages you could try either a file / direction iteration, if your using a database it should be even easier as you can just reproduce all the links at once by tweaking the way you create urls just a bit to output a sitemap.txt (or if you have more then 50 / 100 urls you might want to generate an XML)

在大多数语言中,您可以尝试文件/方向迭代,如果您使用数据库它应该更容易,因为您可以通过调整创建URL的方式一次性地重现所有链接以输出sitemap.txt(或者,如果您有超过50/100的URL,则可能需要生成XML)

If you need help with creating a file iterator you might want to give some more information about which language would suite you best, as a decent PHP solution might not help at all if your writing everything in python.

如果您需要有关创建文件迭代器的帮助,您可能希望提供更多关于哪种语言最适合您的信息,因为如果您在python中编写所有内容,一个不错的PHP解决方案可能根本无济于事。

#2


0  

If you're looking for an automated web service to create the sitemap for you, you can use some of the following:

如果您正在寻找自动化Web服务来为您创建站点地图,则可以使用以下某些功能:

  1. http://www.web-site-map.com/xml_sitemap.php
  2. www.xml-sitemaps.com
  3. www.sitemapdoc.com

You can find a list of services here too: https://code.google.com/p/sitemap-generators/wiki/SitemapGenerators

您也可以在此处找到服务列表:https://code.google.com/p/sitemap-generators/wiki/SitemapGenerators

Good luck!

#3


0  

  1. Go to the XML Sitemap builder
  2. 转到XML Sitemap构建器

  3. Enter the homepage path of your website (e.g. www.mydomain.com)
  4. 输入您网站的主页路径(例如www.mydomain.com)

  5. Enter the change frequency of your website (be honest ;)
  6. 输入您网站的更改频率(说实话;)

  7. Leave the rest as it is and click on start to let the tool make your sitemap
  8. 保持原样并单击开始让工具制作您的站点地图

  9. When it is done download the compressed XML Sitemap version (.gz) and copy it to your root folder
  10. 完成后,下载压缩的XML Sitemap版本(.gz)并将其复制到根文件夹

  11. You can open the file with an text-editor of your choise and change the priority of documents you think. You can use and value between 0.1 and 0.9, but be aware to only give really important sites the higher value.
  12. 您可以使用选择的文本编辑器打开文件,并更改您认为的文档的优先级。您可以使用0.1到0.9之间的值,但要注意只为真正重要的站点提供更高的值。

  13. The following is very important, so that all search engine bots will know you have a sitemap. Create a new file called
  14. 以下内容非常重要,因此所有搜索引擎机器人都知道您有站点地图。创建一个名为的新文件

[Source: How To Create a Google Sitemap in 5 Minutes]

[来源:如何在5分钟内创建Google Sitemap]