@@ -0,0 +1,1726 @@
+#encoding:utf-8%0A%0Afrom utils import get_url, weighted_random_subreddit%0A%0A%0A# Subreddit that will be a source of content%0Asubreddit = weighted_random_subreddit(%7B%0A    'gonewild30plus': 1.0,%0A    # If we want get content from several subreddits%0A    # please provide here 'subreddit': probability%0A    # 'any_other_subreddit': 0.02%0A%7D)%0A# Telegram channel with @reddit2telegram_bot as an admin%0At_channel = '@r_gonewild30plus'%0A%0A%0Adef send_post(submission, r2t):%0A    what, url, ext = get_url(submission)%0A%0A    # If this func returns:%0A    # False %E2%80%93 it means that we will not send%0A    # this submission, let's move to the next.%0A    # True %E2%80%93 everything is ok, we send the submission%0A    # None %E2%80%93 we do not want to send anything this time,%0A    # let's just sleep.%0A%0A    # Get all data from submission that we need%0A    title = submission.title%0A    link = submission.shortlink%0A    text = '%7B%7D%5Cn%7B%7D'.format(title, link)%0A%0A    if what == 'text':%0A        # If it is text submission, it is not really funny.%0A        # return r2t.send_text(submission.selftext)%0A        return False%0A    elif what == 'other':%0A        # Also we are not interesting in any other content.%0A        return False%0A    elif what == 'album':%0A        # It is ok if it is an album.%0A        base_url = submission.url%0A        text = '%7B%7D%5Cn%7B%7D%5Cn%5Cn%7B%7D'.format(title, base_url, link)%0A        r2t.send_text(text)%0A        r2t.send_album(url)%0A        return True%0A    elif what in ('gif', 'img'):%0A        # Also it is ok if it is gif or any kind of image.%0A%0A        # Check if content has already appeared in%0A        # out telegram channel.%0A        if r2t.dup_check_and_mark(url) is True:%0A            return False%0A        return r2t.send_gif_img(what, url, ext, text)%0A    else:%0A        return False%0A

Create app.py