This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from telethon import TelegramClient, events, sync | |
import re, requests | |
# Remember to use your own values from my.telegram.org! | |
api_id = '...' | |
api_hash = '...' | |
username = '...' | |
channel_name = '...' | |
slack_webhook_url = '...' | |
client = TelegramClient(username, api_id, api_hash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Adding some colors to the output | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[0;33m' | |
BLUE='\033[0;34m' | |
NC='\033[0m' | |
# Help text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VideoEmbedUrlGenerator | |
REGEX_ID = %r{(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/|vimeo\.com\/)([a-zA-Z0-9_-]{8,11})}.freeze | |
REGEX_PROVIDER = /(youtube|youtu\.be|vimeo)/.freeze | |
def initialize(url) | |
@url = url | |
end | |
def construct_iframe | |
'<iframe '\ |