def echo(bot, update): """Echo the user message.""" try: link = update.message.text reddit = Downloader() reddit.url = link reddit.path = '' reddit.overwrite = False reddit.max_q = True reddit.min_q = True reddit.max_d = 1e1000 reddit.max_s = 1e1000 reddit.auto_max = False reddit.proxies = {} path = reddit.download() bot.send_video(chat_id=update.message.chat_id, video=open(path, 'rb'), supports_streaming=True) except: bot.send_message(chat_id=update.message.chat_id, text="Failed")
type=int, default=1e1000) optional.add_argument( '-am', '--automax', help= 'Automatically download video with maximum size (Helps for old reddit videos with unknown qualities)', action='store_true') optional.add_argument( '-px', '--proxies', help='Download videos through proxies for blocked regions', type=dict, default={}) args = parser.parse_args() # Link arguments with Redvid reddit = Downloader() print(args) reddit.url = args.url reddit.path = '' reddit.overwrite = False reddit.max_q = True reddit.min_q = True reddit.max_d = 1e1000 reddit.max_s = 1e1000 reddit.auto_max = False reddit.proxies = {} reddit.download()
type=int, default=1e1000) optional.add_argument( '-am', '--automax', help= 'Automatically download video with maximum size (Helps for old reddit videos with unknown qualities)', action='store_true') optional.add_argument( '-px', '--proxies', help='Download videos through proxies for blocked regions', type=dict, default={}) args = parser.parse_args() # Link arguments with Redvid reddit = Downloader() reddit.url = args.url reddit.path = args.path reddit.overwrite = args.overwrite reddit.max_q = args.maxquality reddit.min_q = args.minquality reddit.max_d = args.maxduration reddit.max_s = args.maxsize reddit.auto_max = args.automax reddit.proxies = args.proxies reddit.download()