From 316484be4101845524067f75b3e5b6750704217c Mon Sep 17 00:00:00 2001 From: abc1763613206 <30773956+abc1763613206@users.noreply.github.com> Date: Wed, 17 Oct 2018 14:22:06 +0800 Subject: [PATCH] BaiduPusher:Fix --- scripts/Sitemap_Parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Sitemap_Parser.py b/scripts/Sitemap_Parser.py index cc9db136..123d1aed 100644 --- a/scripts/Sitemap_Parser.py +++ b/scripts/Sitemap_Parser.py @@ -1,11 +1,11 @@ # Sitemap Parser - Convert XML into TXT (Baidu Pusher) from bs4 import BeautifulSoup as bs -filename = 'site/sitemap.xml' +filename = '../site/sitemap.xml' f = open(filename) file = f.read() soup = bs(file, "html.parser") links = soup.find_all('loc') -with open('site/sitemap.txt','w') as f1: +with open('../site/sitemap.txt','w') as f1: for link in links: f1.write(link.text + '\n') -- 2.11.0