From: Benjamin Mako Hill Date: Tue, 31 Mar 2020 15:35:23 +0000 (-0700) Subject: stop writing writing header to one-column list X-Git-Url: https://code.communitydata.science/covid19.git/commitdiff_plain/72bf7bcd3787ffbda4ec2c47204896483e8069c9?ds=inline;hp=09d171608f699eafe6528325938a892937a65302 stop writing writing header to one-column list This feels like it's asking for trouble. Description of the contents of the list is in the filename. --- diff --git a/wikipedia_views/scripts/fetch_daily_views.py b/wikipedia_views/scripts/fetch_daily_views.py index 4f496fe..e3a2ff4 100755 --- a/wikipedia_views/scripts/fetch_daily_views.py +++ b/wikipedia_views/scripts/fetch_daily_views.py @@ -79,7 +79,6 @@ def main(): t_Out = f"{outputPath}dailyviews{queryDate}.tsv" with open(articleFile, 'r') as infile: - next(infile) #skip header articleList = list(infile) j = [] diff --git a/wikipedia_views/scripts/wikiproject_scraper.py b/wikipedia_views/scripts/wikiproject_scraper.py index 2ee3742..9d209a9 100755 --- a/wikipedia_views/scripts/wikiproject_scraper.py +++ b/wikipedia_views/scripts/wikiproject_scraper.py @@ -109,7 +109,6 @@ def main(): #3 Saves the list to a file with open(outputFile, 'w') as f: - f.write("Article\n") f.write('\n'.join(articleNames)+'\n') logging.debug(f"Finished scrape and made a new article file at {datetime.datetime.now()}")