Skip to content
Snippets Groups Projects
Commit 7a6a2f1b authored by Samuel Junesjö's avatar Samuel Junesjö
Browse files

I don't remember, lol, i'm sure it's fine tho

parent d2385f7d
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,6 @@ def configparser():
else:
page = i.replace("\n", "")
urllist.append(domain+page)
#print(urllist)
return urllist
def scraper(urllist):
......@@ -245,12 +244,12 @@ def postformatter(pagebunch):
trustedImagePaths.append(CheckedImagePath)
ImageCount+=1
os.remove(f"html/{ImagePath}")
print(f"{CheckedImagePath} exists, removing {ImagePath}")
#print(f"{CheckedImagePath} exists, removing {ImagePath}")
else:
os.rename(f"html/{ImagePath}", f"html/{CheckedImagePath}")
ImagePaths.append(CheckedImagePath)
ImageCount+=1
print(CheckedImagePath)
#print(CheckedImagePath)
TitleDate = post[0][1]
......@@ -269,7 +268,7 @@ def postformatter(pagebunch):
if "u=https%3A%2F%2F" in parsedLink.query:
parsedLink = urllib.parse.unquote(parsedLink.query)
parsedLink = parsedLink.split("=", 1)[-1]
link = parsedLink.split("&h=", 1)[0]
link = parsedLink.split("&h=", 1)[0]
Etext = re.escape(text)
if text != '' and link != '':
#markDownText = f"[{text}]({link})"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment