more cleanup

This commit is contained in:
Coding with Peter 2023-03-24 11:07:11 -07:00
parent 71031e12d5
commit 7f92add437
1 changed files with 4 additions and 3 deletions

View File

@ -2,13 +2,14 @@
#saved_titles = json.loads( codecs.open('cache/saved_youtube_titles.json','r','utf-8').read() ) #saved_titles = json.loads( codecs.open('cache/saved_youtube_titles.json','r','utf-8').read() )
import requests, codecs, os, re, json import requests, codecs, os, re, json
from pipelines import header, fetch, url from pipelines import header, fetch, url, put_file
from util import clean_title, to_file_friendly from util import clean_title, to_file_friendly, minimal_string
from bs4 import BeautifulSoup as bs from bs4 import BeautifulSoup as bs
from html.parser import HTMLParser from html.parser import HTMLParser
import tomd, checker import tomd, checker
import html2markdown as h2m import html2markdown as h2m
import pypandoc import pypandoc
import webbrowser
h = HTMLParser() h = HTMLParser()
@ -636,7 +637,7 @@ def update_page():
print('From: ' + t2) print('From: ' + t2)
results_dict = {} results_dict = {}
while(t2): t2 = fetch_dict(t2) while(t2): t2 = fetch(t2)
mypage = results_dict mypage = results_dict
fixed_page = checker.safe_html(mypage['body']) fixed_page = checker.safe_html(mypage['body'])
upload_page(course_num,chosen_url,fixed_page) upload_page(course_num,chosen_url,fixed_page)