Skip to content

lskor/tallinn-news-spreader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tallinn News Spreader

This project implements opportunity to send new news from web-site to the telegram channel. Now the project sent post from https://lskor.github.io/ to the Tallinn News

The problem

I had dealt with some web-site with news. It was simple and old site this news which was important like power outage or elevator repair time. This site didn't have any notification. And owner didn't care how he informed people about important information. People didn't have opportunity get info as fast as they can.

Nowadays, I see many news portals which at the same time have a telegram channel, and I'm sure they made posts to the channel manually. Probably special employees do that every day.

What's inside

The project has two main parts. The first one - scraper service with only one endpoint getPost. This is http4s server. Then the endpoint is called, service goes to the web-site and tries to find latest news. It uses scraper (Jsoup) and parses HTML of this page. Finds header, body of news, and date. Service formats this message into a bot-friendly format, and as result returns string.

The second one - bot service. Every duration time it calls scraper service endpoint getPost and receives empty or non empty string. Non empty string is sent to custom telegram channel the Tallinn News like string with markdown.

How it's look like

Tallinn News

Stack

  • sbt
  • cats
  • cats-effect
  • fs2
  • http4s
  • Doobie
  • canoe
  • jsoup

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages