remove readerserver, add declutter.

This commit is contained in:
Jason Schwarzenberger
2020-11-18 12:39:22 +13:00
parent c9da2a078b
commit f5b38f5c6b
21 changed files with 14 additions and 1863 deletions

View File

@@ -3,9 +3,10 @@ logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.DEBUG)
import requests
from settings import READER_PORT
READ_API = 'http://127.0.0.1:33843/headless/details'
READ_COMMENT__API = 'http://127.0.0.1:33843/headless/comments'
READ_API = 'http://127.0.0.1:{}/headless/details'.format(READER_PORT or 3000)
READ_COMMENT__API = 'http://127.0.0.1:{}/headless/comments'.format(READER_PORT or 3000)
TIMEOUT = 60

View File

@@ -3,8 +3,9 @@ logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.DEBUG)
import requests
from settings import READER_PORT
READ_API = 'http://127.0.0.1:33843/simple/details'
READ_API = 'http://127.0.0.1:{}/simple/details'.format(READER_PORT or 3000)
TIMEOUT = 20
def get_html(url):

View File

@@ -142,7 +142,7 @@ def static_story(sid):
url=url,
description=description)
http_server = WSGIServer(('', 33842), flask_app)
http_server = WSGIServer(('', settings.API_PORT or 33842), flask_app)
def _add_new_refs():
for ref, source, urlref in feed.get_list():

View File

@@ -4,6 +4,10 @@
HOSTNAME = 'news.t0.vc'
MAX_STORY_AGE = 3*24*60*60
SCRAPERS = ['headless', 'outline', 'declutter', 'simple']
API_PORT = 33842
READER_PORT = 3000
# Feed Lengths
# Number of top items from each site to pull
# set to 0 to disable that site
@@ -51,8 +55,6 @@ CATEGORY = {}
# ],
# }
SCRAPERS = ['headless', 'outline', 'declutter', 'simple']
# Reddit account info
# leave blank if not using Reddit
REDDIT_CLIENT_ID = ''