diff options
author | sstvinc2 <sstvinc2@gmail.com> | 2017-02-16 21:20:01 -0600 |
---|---|---|
committer | sstvinc2 <sstvinc2@gmail.com> | 2017-02-16 21:20:01 -0600 |
commit | 1b08ad4652091d529588f9fb75f7412a07d2dd28 (patch) | |
tree | 691ab2e5f01fc141a4e3dd182e57108db07134ba /main.py | |
parent | 53e8b692f6374b72238df797bf14e94f0567b331 (diff) |
Some parsing tweaks, mostly for The Guardian
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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() |