Merge pull request #1 from kollieartwolf/patch-3

Fix utf-8 codec error (2/2)
This commit is contained in:
Климентий Титов 2020-04-09 23:01:28 +03:00 committed by GitHub
commit 739756b0a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ if apache_mode == "on":
apache_rewrite = "post.php"
# start the scraping process
fileopen = open(userconfigpath + "web_clone/%s" % (site), "r").readlines()
fileopen = open(userconfigpath + "web_clone/%s" % (site), "r", encoding='utf-8', errors='ignore').readlines()
filewrite = open(userconfigpath + "web_clone/index.html.new", "w")
for line in fileopen: