diff options
author | ssstvinc2 <sstvinc2@gmail.com> | 2017-02-09 20:24:25 -0500 |
---|---|---|
committer | ssstvinc2 <sstvinc2@gmail.com> | 2017-02-09 20:24:25 -0500 |
commit | cbbd1122c78834b1beef349797d142ed6d23218a (patch) | |
tree | 2afab3496e02cc1744e413d82ce509a25e3465f1 /unbiasedFunctions.py | |
parent | 439b2cf7317af9444e99ba58188d7ce80a906af5 (diff) |
Added/tweaked a few news sources, and added a source list to the page
Diffstat (limited to 'unbiasedFunctions.py')
-rw-r--r-- | unbiasedFunctions.py | 10 |
1 files changed, 7 insertions, 3 deletions
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
|