From a694a3eb399b0d49ce9e0cb60b7a769f4eae4277 Mon Sep 17 00:00:00 2001 From: zeek <984294471@qq.com> Date: Sun, 22 Mar 2020 13:22:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 8e79b73..b4d79b1 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,34 @@ ```sh pip3 install -r requirement.txt ``` + +修改get_url.py +```py +# 当前域名的http链接 +url_root = 'https://git.zeekling.cn' +# 需要抓取的根链接,可以多写几个 +url_mine_list = [ + 'https://git.zeekling.cn/', + 'https://git.zeekling.cn/zeekling' +] +# 抓取的最大栈深度,默认为2 +max_depth = 2 +# 不需要写进sitemap.xml的链接 +url_robot_arr = [ + '/user/sign_up', + '/user/login', + '/user/forgot_password' +] +``` +修改sitemap.xml位置,sitemap.py +```py +# 第一个参数为sitemap.xml的位置 +create_xml('sitemap.xml', get_url.url_res_final) +``` + +修改完了之后执行 +```sh +./sitemap.py +``` + +