Coder Social home page Coder Social logo

fillll / reddit2telegram Goto Github PK

View Code? Open in Web Editor NEW
252.0 252.0 127.0 1.58 MB

Bot to supply telegram channel with hot Reddit submissions.

Home Page: https://t.me/r_channels

License: MIT License

Python 99.92% Shell 0.08%
bot reddit telegram telegram-channel

reddit2telegram's People

Contributors

aliannejadipourya avatar alsogamer avatar baatochan avatar csbob avatar daksh777 avatar dhighet avatar fcoalcantarajr avatar fillll avatar guzellezug avatar iassis avatar jinsoraj avatar jithumon avatar kaeldas avatar kassane avatar kelvincrag avatar lgyanf avatar luckydonald avatar mag1cbyt3s avatar martinligabue avatar massolari avatar not-jan avatar nsiregar avatar ohuto avatar pepega1309 avatar r4d1um avatar reyasmohammed avatar soulofrubber avatar strappazzon avatar xegim avatar xpl0itu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

reddit2telegram's Issues

Private subreddits

Hi,

Thanks for the valuable code. Does it also work for private subreddits? What about with private Telegram channels or groups?

modularize posting

All reddits share similar post types. So the code shouldn't be rewritten for each module.
The process of posing media from a reddit post should be in anoter utils file.

No module named 'channels.unexpected'

It took me a while to get this running without an error but even after I did, whenever I ran docker-compose up reddit2tg this message gets posted in the channel :

No module named 'channels.unexpected'

However, the output doesnt show any errors:

Recreating reddit2telegram_reddit2tg_1 ...
Recreating reddit2telegram_reddit2tg_1 ... done
Attaching to reddit2telegram_reddit2tg_1
reddit2tg_1  | Sentry is attempting to send 1 pending error messages
reddit2tg_1  | Waiting up to 10 seconds
reddit2tg_1  | Press Ctrl-C to quit
reddit2telegram_reddit2tg_1 exited with code 0

gfycat

def getGfy(url):
  rname = re.findall(r'gfycat.com\/(?:detail\/)?(\w*)', url)
  print rname[0]
  url = "https://thumbs.gfycat.com/" + rname[0] + "-size_restricted.gif"
  return url

Wow, just read it and I have no clue how telepot works or how are you catching the urls maybe its too early and still sleepy, but if you catch the gfycat identifier and add https://thumbs.gfycat.com/ + Identifier + -size_restricted.gif it should give you the smaller version

Send the comments

Hi :)

Is there an easy way to send every comment in the subreddit?

Docker magic.

It will be much more easy to operate with it using docker.

There should be two containers:

  1. Mongo (just for storing already sended submissions).
  2. Sender itself (always alive with cron inside).

Bot freezes multiple times per day

In multiple days the bot just stops sending messages after some time, no particular hour seems to be causing the problem.
To see an example check the post history of this channel where the bot is supposed to post once every two hours.
Happy to provide any info that can help.

MEDIA_CAPTION_TOO_LONG

TelegramError: ('MEDIA_CAPTION_TOO_LONG', 400, {'description': 'MEDIA_CAPTION_TOO_LONG', 'error_code': 400, 'ok': False})

Underlying mechanics

Hi, I wanted to ask how do you scrape the posts from Reddit, consider the future price changes for the API? Do you still use the API or do you scrape the HTML with something Selenium or BeautifulSoup? Thanks in advance.

Project posts random text in channel

I made the project run every 25 minutes or so, tracking posts from 3 subreddits and posting from both new and hot timelines. But after posting 2-3 posts it starts posts text in channel such as,

13 → 0.13 > 0.06.
13 → 0.13 > 0.07.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.