Browse Source

adjust declutter settings.

Jason Schwarzenberger 5 months ago
parent
commit
27987496bc
3 changed files with 5 additions and 2 deletions
  1. 2 1
      apiserver/feed.py
  2. 2 0
      apiserver/scrapers/declutter.py
  3. 1 1
      apiserver/settings.py.example

+ 2 - 1
apiserver/feed.py

@@ -14,7 +14,7 @@ from feeds.manual import manual
 from feeds.sitemap import Sitemap
 from feeds.category import Category
 from scrapers import outline
-from scrapers.declutter import declutter, headless, simple
+from scrapers.declutter import declutter, declutterlite, headless, simple
 from utils import clean
 
 INVALID_DOMAINS = ['youtube.com', 'bloomberg.com', 'wsj.com', 'sec.gov']
@@ -75,6 +75,7 @@ def get_article(url):
         'simple': simple,
         'outline': outline,
         'declutter': declutter,
+        'declutterlite': declutterlite,
     }
     available = settings.SCRAPERS or ['headless', 'simple']
     if 'simple' not in available:

+ 2 - 0
apiserver/scrapers/declutter.py

@@ -60,5 +60,7 @@ class Headless(Simple):
         return comments
 
 declutter = Headless('https://declutter.1j.nz', 'Declutter', internal=False)
+declutterlite = Simple('https://declutter.1j.nz', 'Declutter', internal=False)
+
 headless = Headless(f"http://127.0.0.1:{HEADLESS_READER_PORT or 33843}", 'Headless')
 simple = Simple(f"http://127.0.0.1:{SIMPLE_READER_PORT or 33843}", 'Simple')

+ 1 - 1
apiserver/settings.py.example

@@ -4,7 +4,7 @@
 HOSTNAME = 'news.t0.vc'
 MAX_STORY_AGE = 3*24*60*60
 
-SCRAPERS = ['headless', 'outline', 'declutter', 'simple']
+SCRAPERS = ['headless', 'outline', 'declutterlite', 'declutter', 'simple']
 API_PORT = 33842
 SIMPLE_READER_PORT = 33843
 HEADLESS_READER_PORT = 33843