From 0b54e6887b5ad2d3986f9bd07e06f9dd5a3dd7a2 Mon Sep 17 00:00:00 2001 From: sigvartmh Date: Tue, 16 May 2017 13:20:20 +0200 Subject: [PATCH] Update utf8 errro --- app.py | 2 +- itl_scrape.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 12df90c..a2c6062 100644 --- a/app.py +++ b/app.py @@ -15,7 +15,7 @@ def download(btn): selected = app.getCheckBox(courses[label]) if selected: course_links[label]=courses[label] - print(course_links) + #print(course_links.encode('utf-8')) print("Download selected") scraper.download_links(course_links) diff --git a/itl_scrape.py b/itl_scrape.py index 41c5a82..5d5d759 100644 --- a/itl_scrape.py +++ b/itl_scrape.py @@ -146,9 +146,10 @@ class itslearning_scraper(): except: filename = title self.failure += 1 - print("File created with name:",filename) filename = slugify(filename) + print("File created with name:",filename) filename = os.path.join(os.path.abspath(os.path.curdir),filename) + print("File created with path:",filename) with open(filename, 'wb') as f: for chunk in r.iter_content(chunk_size=1024): if chunk: