This is quickly and loveless hacked together, but might give you a helping hand building something useful for your use case.

The bot posts in a private telegram group, helping some friends that otherwise would have to go and check before their first meeting of the day.


$ bundle init a new ruby project using Ruby@2.6.5 (!important, because the underlying docker container with chrome is using 2.6.5), then create a main.rb and edit the token and the group’s id in group:

require 'ferrum'
require 'telegram/bot'

browser = [1920, 1080], browser_options: { 'no-sandbox': nil })
url = ""
map_with_corona = []
browser.css(".textpic").map do |elem|
  map_with_corona << elem.at_css("a.image-link").attribute(:href) rescue nil


token = "1337:Go_is_alanguagedevelopedin2020-VEzBUs"
group = "-3612313371337"

bot =
bot.api.send_photo(chat_id: group, photo: "" + map_with_corona.first, caption: url)

edit the gemfile to contain at least ferrum and telegram-bot-ruby

# frozen_string_literal: true

source ""

git_source(:github) {|repo_name| "{repo_name}" }

# gem "rails"

gem 'ferrum'
gem 'telegram-bot-ruby'

run $ bundle install ;-)

and the Dockerfile looks something like this:

FROM simonneutert/ruby-2.6.5-headless-chrome


RUN gem install bundler

COPY Gemfile* ./
RUN bundle install

COPY . .

CMD ruby main.rb

Build the docker $ docker build . -t corona_rlp_bot and run it (in a crontask?)
$ docker run --rm corona_rlp_bot