diff options
author | sstvinc2 <sstvinc2@gmail.com> | 2017-02-14 21:48:10 -0600 |
---|---|---|
committer | sstvinc2 <sstvinc2@gmail.com> | 2017-02-14 21:48:10 -0600 |
commit | c0a52698826fba2aeb5c2889f3856f051db1052c (patch) | |
tree | b26190c77ad99a5400c7fa0f64d29537b90bee53 /main.py | |
parent | 7ceea6a5a495302ffdec9921ea9f841a2b6df8c2 (diff) |
modularized code a bit, and added Fox News with new parser
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 27 |
1 files changed, 2 insertions, 25 deletions
@@ -71,31 +71,8 @@ def run(): nyt=buildNYT() sourceList.append(nyt) - ''' - sourceList.append(NewsSource('New York Times', - 'http://nytimes.com', - ['<a href="'], - ['<article class="story theme-summary"', '<a href="'], - ['<hr class="single-rule"', 'article class="story theme-summary', 'h2 class="story-heading"><a href="'], - '<div class="b-column column">', '<!-- close photo-spot-region -->', - 'section id="top-news" class="top-news"', '</div><!-- close a-column -->', - 'class="second-column-region region"', 'html.geo-dma-501 .nythpNYRegionPromo')) - ''' - - - - - sourceList.append(NewsSource('Fox News', - 'http://foxnews.com', - ['<h1><a href="'], - ['<li data-vr-contentbox=""><a href="'], - [], - None, None, - '<div class="top-stories">', '<section id="latest"', - None, None)) - - - + fox=buildFoxNews() + sourceList.append(fox) #scrape all urls and build data structure newsSourceArr=buildNewsSourceArr(sourceList) |