diff --git a/get_url.py b/get_url.py index ab5ac5f..f91d237 100755 --- a/get_url.py +++ b/get_url.py @@ -7,7 +7,7 @@ from bs4 import BeautifulSoup url_root = 'https://git.zeekling.cn' url_mine_list = [ - 'https://git.zeekling.cn', + 'https://git.zeekling.cn/', 'https://git.zeekling.cn/zeekling' ] @@ -27,7 +27,8 @@ url_robot_arr = [ url_static_arr = [ '.js', '.css', - '.cscc' + '.cscc', + 'None' ] diff --git a/sitemap.py b/sitemap.py index 9dca82f..7e238c1 100755 --- a/sitemap.py +++ b/sitemap.py @@ -9,11 +9,11 @@ import get_url def create_xml(filename, url_list): header = '\n' - file = open(filename, 'a', encoding='utf-8') + file = open(filename, 'w', encoding='utf-8') file.writelines(header) file.close() + times = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S+00:00") for url in url_list: - times = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S+00:00") urls = re.sub(r"&", "&", url) ment = " \n %s\n %s\n weekly\n 0.8\n \n" % (urls, times) file = open(filename, 'a', encoding='utf-8')