From cbbd1122c78834b1beef349797d142ed6d23218a Mon Sep 17 00:00:00 2001 From: ssstvinc2 Date: Thu, 9 Feb 2017 20:24:25 -0500 Subject: Added/tweaked a few news sources, and added a source list to the page --- unbiasedFunctions.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'unbiasedFunctions.py') diff --git a/unbiasedFunctions.py b/unbiasedFunctions.py index 84b4ec9..fc6f45b 100644 --- a/unbiasedFunctions.py +++ b/unbiasedFunctions.py @@ -86,8 +86,6 @@ def extractURLs(content, source): h1=source.url+h1 h1s.append(h1) - - h2=content if source.h2SectionDividerStart!=None: h2=h2.split(source.h2SectionDividerStart, 1)[1] @@ -198,7 +196,13 @@ def buildOutput(newsSourceArr): template=template.replace('xxTitle2-'+str(i+1)+'xx', article.title) template=template.replace('xxImg2-'+str(i+1)+'xx', article.img) - + sourcesStr='' + for i in range(len(newsSourceArr)-1): + sourcesStr+=newsSourceArr[i].name+', ' + sourcesStr+=newsSourceArr[-1].name + print(sourcesStr) + template=template.replace('xxSourcesxx', sourcesStr) + #return updated text return template -- cgit v1.2.3