Add NYT grabbers.

This commit is contained in:
Jack Hadrill 2020-01-18 19:59:02 +00:00
parent 6fcf0c9ace
commit 8bc11c64ba
3 changed files with 14 additions and 0 deletions

4
run.py
View File

@ -7,6 +7,8 @@ from sources.BBCBusiness import BBCBusiness
from sources.BBCTechnology import BBCTechnology
from sources.ReutersBusiness import ReutersBusiness
from sources.ReutersTechnology import ReutersTechnology
from sources.NYTBusiness import NYTBusiness
from sources.NYTTechnology import NYTTechnology
DATABASE_PATH = Path("storage.db")
GRAB_FREQUENCY = 15
@ -25,6 +27,8 @@ def main():
BBCTechnology(db),
ReutersBusiness(db),
ReutersTechnology(db),
NYTBusiness(db),
NYTTechnology(db),
]
while True:

5
sources/NYTBusiness.py Normal file
View File

@ -0,0 +1,5 @@
from grabber import Grabber
class NYTBusiness(Grabber):
feed_url = "http://rss.nytimes.com/services/xml/rss/nyt/Business.xml"

5
sources/NYTTechnology.py Normal file
View File

@ -0,0 +1,5 @@
from grabber import Grabber
class NYTTechnology(Grabber):
feed_url = "http://rss.nytimes.com/services/xml/rss/nyt/Technology.xml"