File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 20
20
# Analyze keywords
21
21
analyzer = Analyzer (entries )
22
22
keywords = analyzer .get_keywords_count ()
23
+ pprint (keywords )
23
24
24
25
# Get data from analyzer.
25
26
data = analyzer .get_morst_relevant_data (keywords )
30
31
31
32
slack_message = "What's happening today: {}\n \n {}" .format (article_result .orginal .title , article_result .url )
32
33
request ('GET' , 'https://slack.com/api/chat.postMessage?token=xoxp-87076484640-87088670897-121376898595-f020c7663ad965c5ed1a3722bcec15a8&channel=python-hacks&text={}&pretty=1' .format (slack_message ))
34
+
35
+ titles = "\n " .join ([article .orginal .title for article in data ['trending_articles' ]])
36
+ pprint (titles )
37
+ slack_message = "Other trending articles: \n \n {}" .format (titles )
38
+ request ('GET' ,
39
+ 'https://slack.com/api/chat.postMessage?token=xoxp-87076484640-87088670897-121376898595-f020c7663ad965c5ed1a3722bcec15a8&channel=python-hacks&text={}&pretty=1' .format (
40
+ slack_message ))
You can’t perform that action at this time.
0 commit comments