Advertisement
MUSTAFA733737

Hello World

Dec 21st, 2021
731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.32 KB | None | 0 0
  1. import requests
  2. import telebot
  3.  
  4. bot = telebot.TeleBot("2012506055:AAFYd_KVIlOk4TvxPZms-KXECIxuULwnGHU")
  5. r = requests.session()
  6. @bot.message_handler(commands=['start'])
  7. def start(message):
  8.     first = message.from_user.first_name
  9.     bot.send_message(message.chat.id, text=f"<strong>Hi {first}\n- - - - -\nSend TikTok Video Url To Download Him! \n- - - - -\nBy @SMOKA_28</strong>",parse_mode="html")
  10. @bot.message_handler(func=lambda m: True)
  11. def Get(message):
  12.     msg = message.text
  13.     text = msg.split(":")[0]
  14.     t_title = msg.split(":")[1]
  15.     form = msg.split(":")[2]
  16.     bot.send_message(message.chat.id,f"<strong>Wait Please ... </strong>",parse_mode="html")
  17.     key = 'i9QLuX9Vw0AM6lq3eKuFIAKnRPgt6Za1'
  18.     login_data = {'api_dev_key':key,
  19.  'api_user_name':'MUSTAFA733737',
  20.  'api_user_password':'krarkrar1111'}
  21.     data = {'api_option':'paste',
  22.  'api_dev_key':key,
  23.  'api_paste_code':text,
  24.  'api_paste_name':t_title,
  25.  'api_paste_expire_date':'N',
  26.  'api_user_key':None,
  27.  'api_paste_format':form}
  28.     login = requests.post('https://pastebin.com/api/api_login.php', data=login_data)
  29.     data['api_user_key'] = login.text
  30.     r = requests.post('https://pastebin.com/api/api_post.php', data=data).text
  31.     bot.send_message(message.chat.id, text=f"<strong>Done- - - - -\n paste URL : {r} </strong>",parse_mode="html")
  32.  
  33. pass
  34. bot.polling(True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement