• Stars
    star
    205
  • Rank 191,264 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ“° Telegram bot that posts new hot stories from Hacker News to telegram channel

hackernewsbot

Telegram bot that posts new hot stories from Hacker News to telegram channel

Backend

Bot runs on Google App Engine

Hacker News API

Bot uses Hacker News API

It loads top stories every 10 minutes and posts any story that reached 100+ score(adjusted for inflation)

Telegram API

Bot uses Telegram Bot API to post messages to the telegram channel with sendMessage request

URL shortening

Bot used bit.ly and goo.gl for url shortening, but now it uses internal shortener

How to run your own hackernewsbot

  • Clone this project
  • Run pip install -r requirements.txt -t lib/ to install dependencies
  • Download and install Google Cloud SDK
  • Register your app in Google Cloud console
  • Register your bot via BotFather
  • Rename sample_app.yaml to app.yaml and
    • replace yourappid with your App engine app id
    • replace YOUR_TELEGRAM_BOT_TOKEN with your bot token
  • Possibly you'll want to create your own channel and your bot as an admin. Also change @hacker_news_feed in database.py to your channel id
  • Run gcloud app deploy app.yaml --project [YOUR_PROJECT_NAME] in the project folder
  • Run gcloud app deploy cron.yaml --project [YOUR_PROJECT_NAME] in the project folder

Local development

To run server locally you can use dev_appserver.py:

dev_appserver.py .

See also

More Repositories

1

react-native-looped-carousel

🎠 Looped carousel for React Native
JavaScript
1,489
star
2

react-native-grid-component

πŸ”² React native grid component
JavaScript
265
star
3

slack-emoji

:suspect: My slack emoji collection and download script
JavaScript
108
star
4

asciifacesbot

πŸ˜ƒ Telegram Bot @asciifacesbot that allows you to append ascii faces to your messages Β―\_(ツ)_/Β―
Python
24
star
5

stats

πŸ“Š Request statistics middleware that stores response times, status code counts, etc
JavaScript
22
star
6

awesome-hacker-news

πŸ“° More awesome hacker news!
JavaScript
17
star
7

designernewsbot

πŸ‘©β€πŸŽ¨ Telegram bot that posts new hot stories from Designer News, shots from Dribbble and projects from Behance to telegram channel
TypeScript
11
star
8

q

Simple queue task runner written in typescript
TypeScript
8
star
9

til

πŸ“š Today I Learned
7
star
10

awesome-til

πŸ““ List of awesome TIL (Today I Learned) repos and websites
5
star
11

dribbble-top

API for most popular dribbble shots
JavaScript
4
star
12

want-to-build

πŸ“œ List of projects that I want to build
3
star
13

deno-advent-2018

Completing Advent of Code 2018 using deno
TypeScript
2
star
14

ezlytics

Easy analytics
JavaScript
1
star
15

bunxy

Simple proxy server using bun
TypeScript
1
star
16

empatika-server-practice

Practice makes perfect
Python
1
star
17

mibl

markdown as a link o_O
JavaScript
1
star
18

macaque

πŸ’ [WIP]
TypeScript
1
star
19

node-cloudflare-ddns

Small node.js program that allows you to use CloudFlare as a DDNS / DynDNS Provider.
JavaScript
1
star