From 7f92add4379a86e9d612b7a4c57dde26c3c2d4f0 Mon Sep 17 00:00:00 2001 From: Coding with Peter Date: Fri, 24 Mar 2023 11:07:11 -0700 Subject: [PATCH] more cleanup --- content.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content.py b/content.py index be5553d..2fc4832 100644 --- a/content.py +++ b/content.py @@ -2,13 +2,14 @@ #saved_titles = json.loads( codecs.open('cache/saved_youtube_titles.json','r','utf-8').read() ) import requests, codecs, os, re, json -from pipelines import header, fetch, url -from util import clean_title, to_file_friendly +from pipelines import header, fetch, url, put_file +from util import clean_title, to_file_friendly, minimal_string from bs4 import BeautifulSoup as bs from html.parser import HTMLParser import tomd, checker import html2markdown as h2m import pypandoc +import webbrowser h = HTMLParser() @@ -636,7 +637,7 @@ def update_page(): print('From: ' + t2) results_dict = {} - while(t2): t2 = fetch_dict(t2) + while(t2): t2 = fetch(t2) mypage = results_dict fixed_page = checker.safe_html(mypage['body']) upload_page(course_num,chosen_url,fixed_page)