mirror of
https://github.com/KevinMidboe/ITLscraper.git
synced 2025-10-29 09:40:13 +00:00
Update utf8 errro
This commit is contained in:
2
app.py
2
app.py
@@ -15,7 +15,7 @@ def download(btn):
|
|||||||
selected = app.getCheckBox(courses[label])
|
selected = app.getCheckBox(courses[label])
|
||||||
if selected:
|
if selected:
|
||||||
course_links[label]=courses[label]
|
course_links[label]=courses[label]
|
||||||
print(course_links)
|
#print(course_links.encode('utf-8'))
|
||||||
|
|
||||||
print("Download selected")
|
print("Download selected")
|
||||||
scraper.download_links(course_links)
|
scraper.download_links(course_links)
|
||||||
|
|||||||
@@ -146,9 +146,10 @@ class itslearning_scraper():
|
|||||||
except:
|
except:
|
||||||
filename = title
|
filename = title
|
||||||
self.failure += 1
|
self.failure += 1
|
||||||
print("File created with name:",filename)
|
|
||||||
filename = slugify(filename)
|
filename = slugify(filename)
|
||||||
|
print("File created with name:",filename)
|
||||||
filename = os.path.join(os.path.abspath(os.path.curdir),filename)
|
filename = os.path.join(os.path.abspath(os.path.curdir),filename)
|
||||||
|
print("File created with path:",filename)
|
||||||
with open(filename, 'wb') as f:
|
with open(filename, 'wb') as f:
|
||||||
for chunk in r.iter_content(chunk_size=1024):
|
for chunk in r.iter_content(chunk_size=1024):
|
||||||
if chunk:
|
if chunk:
|
||||||
|
|||||||
Reference in New Issue
Block a user