-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
46 lines (23 loc) · 817 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
# Main App
from controllers.scrape.scrape import Scrape
from controllers.articles.article_processor import ArticleProcessor
from controllers.reports.reports import Reports
# scrapers
def google_news_scrape():
Scrape.google_news_scrape()
def newsapi_scrape():
Scrape.newsapi_scrape()
# reports
def send_report():
Reports.send_report()
# article processing
def process_article_headlines(article_ids):
ArticleProcessor.create_headline_words_from_articles(article_ids)
def process_all_headlines(batch_amount=20, force=False):
ArticleProcessor.process_all_headlines(batch_amount, force)
# word blacklist
from models.word_blacklist.word_blacklist import WordBlacklist
def add_blacklist_word(words):
WordBlacklist.add_to_blacklist(words)