From 47c66592d9254c201e4f4152d777424d47ca5cb2 Mon Sep 17 00:00:00 2001 From: Jack Hadrill Date: Sat, 18 Jan 2020 23:26:16 +0000 Subject: [PATCH] Add four grabbers. --- run.py | 8 ++++++++ sources/HuffingtonPostEconomy.py | 5 +++++ sources/IBTimesCompanies.py | 7 +++++++ sources/IBTimesTechnology.py | 7 +++++++ sources/NYTEconomy.py | 5 +++++ 5 files changed, 32 insertions(+) create mode 100644 sources/HuffingtonPostEconomy.py create mode 100644 sources/IBTimesCompanies.py create mode 100644 sources/IBTimesTechnology.py create mode 100644 sources/NYTEconomy.py diff --git a/run.py b/run.py index 52555df..38b1d27 100644 --- a/run.py +++ b/run.py @@ -11,9 +11,13 @@ from sources.ForbesBusiness import ForbesBusiness from sources.ForbesFinance import ForbesFinance from sources.ForbesTechnology import ForbesTechnology from sources.HuffingtonPostBusiness import HuffingtonPostBusiness +from sources.HuffingtonPostEconomy import HuffingtonPostEconomy from sources.HuffingtonPostTechnology import HuffingtonPostTechnology +from sources.IBTimesCompanies import IBTimesCompanies +from sources.IBTimesTechnology import IBTimesTechnology from sources.MacWorld import MacWorld from sources.NYTBusiness import NYTBusiness +from sources.NYTEconomy import NYTEconomy from sources.NYTTechnology import NYTTechnology from sources.ReutersBusiness import ReutersBusiness from sources.ReutersTechnology import ReutersTechnology @@ -42,9 +46,13 @@ def main(): ForbesFinance(db), ForbesTechnology(db), HuffingtonPostBusiness(db), + HuffingtonPostEconomy(db), HuffingtonPostTechnology(db), + IBTimesCompanies(db), + IBTimesTechnology(db), MacWorld(db), NYTBusiness(db), + NYTEconomy(db), NYTTechnology(db), ReutersBusiness(db), ReutersTechnology(db), diff --git a/sources/HuffingtonPostEconomy.py b/sources/HuffingtonPostEconomy.py new file mode 100644 index 0000000..e89c090 --- /dev/null +++ b/sources/HuffingtonPostEconomy.py @@ -0,0 +1,5 @@ +from grabber import Grabber + + +class HuffingtonPostEconomy(Grabber): + feed_url = "https://www.huffpost.com/section/economy/feed" diff --git a/sources/IBTimesCompanies.py b/sources/IBTimesCompanies.py new file mode 100644 index 0000000..d28e2e2 --- /dev/null +++ b/sources/IBTimesCompanies.py @@ -0,0 +1,7 @@ +from grabber import Grabber + + +class IBTimesCompanies(Grabber): + feed_url = "http://www.ibtimes.co.uk/rss/companies" + # 2020-01-17T09:50:28+00:00 + date_format = "%Y-%m-%dT%H:%M:%S%z" diff --git a/sources/IBTimesTechnology.py b/sources/IBTimesTechnology.py new file mode 100644 index 0000000..9bb6709 --- /dev/null +++ b/sources/IBTimesTechnology.py @@ -0,0 +1,7 @@ +from grabber import Grabber + + +class IBTimesTechnology(Grabber): + feed_url = "http://www.ibtimes.co.uk/rss/technology" + # 2020-01-17T09:50:28+00:00 + date_format = "%Y-%m-%dT%H:%M:%S%z" diff --git a/sources/NYTEconomy.py b/sources/NYTEconomy.py new file mode 100644 index 0000000..c0336b7 --- /dev/null +++ b/sources/NYTEconomy.py @@ -0,0 +1,5 @@ +from grabber import Grabber + + +class NYTEconomy(Grabber): + feed_url = "http://rss.nytimes.com/services/xml/rss/nyt/Economy.xml"