summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/main.py b/main.py
index 3b39a73..ea1508f 100644
--- a/main.py
+++ b/main.py
@@ -19,7 +19,19 @@ def run():
#nyt=buildNYT()
#sourceList.append(nyt)
- gdn=buildGuardian()
+ #for some reason, The Guardian sometimes just doesn't work right?
+ #loop until it gets it right
+ h1='https://www.theguardian.com/us'
+ looped=False
+ while h1=='https://www.theguardian.com/us':
+ try:
+ gdn=buildGuardian()
+ h1=gdn.h1Arr[0]
+ except:
+ print('The Guardian: build error. Looping again.')
+ if looped:
+ print('Guardian loop')
+ looped=True
sourceList.append(gdn)
blz=buildBlaze()