From c0a52698826fba2aeb5c2889f3856f051db1052c Mon Sep 17 00:00:00 2001 From: sstvinc2 Date: Tue, 14 Feb 2017 21:48:10 -0600 Subject: modularized code a bit, and added Fox News with new parser --- main.py | 27 +--------- parser.py | 175 +++++++++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 136 insertions(+), 66 deletions(-) diff --git a/main.py b/main.py index 63fd908..e26c8c2 100644 --- a/main.py +++ b/main.py @@ -71,31 +71,8 @@ def run(): nyt=buildNYT() sourceList.append(nyt) - ''' - sourceList.append(NewsSource('New York Times', - 'http://nytimes.com', - ['', '', - 'section id="top-news" class="top-news"', '', - 'class="second-column-region region"', 'html.geo-dma-501 .nythpNYRegionPromo')) - ''' - - - - - sourceList.append(NewsSource('Fox News', - 'http://foxnews.com', - ['

', '
', 1)[1] + h2=h2.split('
', 1)[0] + while ' -- cgit v1.2.3