summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorsstvinc2 <sstvinc2@gmail.com>2017-02-14 21:48:10 -0600
committersstvinc2 <sstvinc2@gmail.com>2017-02-14 21:48:10 -0600
commitc0a52698826fba2aeb5c2889f3856f051db1052c (patch)
treeb26190c77ad99a5400c7fa0f64d29537b90bee53 /main.py
parent7ceea6a5a495302ffdec9921ea9f841a2b6df8c2 (diff)
modularized code a bit, and added Fox News with new parser
Diffstat (limited to 'main.py')
-rw-r--r--main.py27
1 files changed, 2 insertions, 25 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',
- ['<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)