# along with this program. If not, see <https://www.gnu.org/licenses/>. from telethon import events from fridaybot.modules.sql_helper.PostAppender_sql import ( add_new_datas_in_db, is_data_indbs, is_footer, remove_dataz, ) from fridaybot.utils import admin_cmd lulstark = [".", ",", "!", "'"] @friday.on(admin_cmd(pattern="spf (.*)")) async def mstark(event): await event.edit("`Processing..`") lul_id = event.chat_id append_text = event.pattern_match.group(1) is_foot = True if event.is_group: await event.edit( "`No, LoL You Can't Set Channel Post Appender In Groups, lol`") return if event.is_private: await event.edit( "`No, LoL You Can't Set Channel Post Appender In Private Chats, lol`" ) return if is_data_indbs(lul_id):
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. import requests from yahoo_fin import stock_info as si from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="liveprice (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) try: a = si.get_live_price(input_str) def get_symbol(symbol): url = "http://d.yimg.com/autoc.finance.yahoo.com/autoc?query={}®ion=1&lang=en".format( symbol) result = requests.get(url).json() for x in result["ResultSet"]["Result"]: if x["symbol"] == symbol: return x["name"]
`xiaomi` : __Search for Xiaomi firmwares__""" dev_name = """__**Available Devloper name for Gcam :- **__ `AdamB` , `alexey070315` , `alone_in_dark` , `arnova8G2` , `arthur` , `baadnwz` , `backrider` , `boxer198615` , `bsg` , `burial` , `charles` , `cstark27` , `dieflix` , `dpstar7582` , `fractal` , `fu24` , `greatness` , `harysviewty` , `hass31` , `homersp` , `hpengw` , `idan` , `ivanich` , `jairo_rossi` , `jean` , `johngalt` , `kokroo` , `MadnessKnight` , `marcant01` , `marco` , `MarcosMucelin` , `Metzger100` , `mf182` , `miniuser123` , `MWP` , `namok` , `Nikita` , `nullbytepl` , `ojosehenrick` , `onfire` , `overwhelmer` , `PERCIFHM34` , `PitbulL` , `raznoptid` , `rz_end` , `san1ty` , `saneklic` , `savitar` , `scrubber` , `serjo87` , `sipollo` , `skulshady` , `the_dise` , `tigr` , `tolyan009` , `UltraM8` , `urikill` , `urnyx05` , `wichaya` , `wyroczen` , `xenius9` , `xtrme` , `zoran`""" tools = """__**Available Android Tools :- **__ `microg` , `gapps` , `nanodroid` , `adb` , `fastboot` , `astudio` , `magisk`""" xiaomi_cmd = """"__**Available Xiaomi commands :- **__ `firmware` , `vendor` , `specs` , `fastboot` , `recovery`""" @bot.on(admin_cmd(pattern="rom(?: |$)(.*)")) @bot.on(sudo_cmd(pattern="rom(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return details = event.pattern_match.group(1) catevent = await edit_or_reply(event, "```Processing...```") if not details: await catevent.edit(f"{rom_name}") return kakashi = details rom, code = kakashi.split(" ", 1) if rom.strip() in ("aex", "aicp", "aosip", "pa", "aqua", "arrow", "bootlag", "candy", "carbon", "colt", "cosp", "crdroid", "dotos", "dump", "evox", "havoc", "licrog", "lineage", "omni", "pe", "pdust", "pixys", "potato", "revenge",
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from textblob import TextBlob from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="spellcheck (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) a = input_str # print("original text: "+str(a)) b = TextBlob(a) # print("corrected text: "+str(b.correct())) c = b.correct() await event.edit( f"<b><u>Check Completed</b></u> \n\n<b>Original Text</b>:- <code>{a}</code> \n<b>Corrected Text:-</b> <code>{c}</code>", parse_mode="HTML", )
send_media=None, send_stickers=None, send_gifs=None, send_games=None, send_inline=None, embed_links=None, ) MUTE_RIGHTS = ChatBannedRights(until_date=None, send_messages=True) UNMUTE_RIGHTS = ChatBannedRights(until_date=None, send_messages=False) # ================================================ # @register(outgoing=True, pattern="^.setgpic$") @borg.on(admin_cmd(pattern=r"setgpic")) @errors_handler async def set_group_photo(gpic): """ For .setgpic command, changes the picture of a group """ if not gpic.is_group: await gpic.edit("`I don't think this is a group.`") return replymsg = await gpic.get_reply_message() chat = await gpic.get_chat() admin = chat.admin_rights creator = chat.creator photo = None if not admin and not creator: await gpic.edit(NO_ADMIN) return
'nsX01': 'Pornography - High Risk', 'nsX02': 'Spammer - High Risk', 'nsX03': 'Spam Adding Users - High Risk', 'nsX04': 'Raid Participants - High Risk', 'nsX05': 'Licence violation - Low Risk', 'nsX06': 'Spam Bot - High Risk', 'nsX07': 'Flood - High Risk', 'nsX08': 'Malware - High Risk', 'nsX09': 'PM Spam - High Risk', 'nsX10': 'Power Misuser - Medium Risk', 'nsX11': 'Multiple Risks - Extreme Risk', 'nsX12': 'Scam - Extreme Risk' } @borg.on(admin_cmd(pattern="nspban(?: |$)(.*)")) async def oki(event): await event.edit("`Processing...`") extra = None args = event.pattern_match.group(1) if event.reply_to_msg_id: previous_message = await event.get_reply_message() user = await borg.get_entity(previous_message.sender_id) extra = event.pattern_match.group(1) elif args: args = event.pattern_match.group(1).split(" ", 1) userz = args[0] if userz.isnumeric(): user = int(userz) else: try:
""" import io import traceback from datetime import datetime from selenium import webdriver from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd from fridaybot import CHROME_DRIVER, CMD_HELP, GOOGLE_CHROME_BIN from fridaybot.utils import edit_or_reply, sudo_cmd import requests from selenium import webdriver @bot.on(admin_cmd(pattern="ss (.*)")) @bot.on(sudo_cmd(pattern="ss (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return if Config.GOOGLE_CHROME is None: await edit_or_reply(event, "Need to install Google Chrome. Module Stopping.") return catevent = await edit_or_reply(event, "`Processing ...`") start = datetime.now() try: chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--ignore-certificate-errors") chrome_options.add_argument("--test-type") chrome_options.add_argument("--headless")
from selenium.webdriver.support.ui import Select from selenium.webdriver.chrome.options import Options from selenium import webdriver from telethon import events from urllib.parse import quote_plus from urllib.error import HTTPError from time import sleep import asyncio import os import random from fridaybot.utils import admin_cmd #@borg.on(events.NewMessage(pattern=r"\.karb ", outgoing=True)) @borg.on(admin_cmd(pattern="karb")) async def carbon_api(e): RED = random.randint(0, 256) GREEN = random.randint(0, 256) BLUE = random.randint(0, 256) THEME = [ "3024-night", "a11y-dark", "blackboard", "base16-dark", "base16-light", "cobalt", "dracula", "duotone-dark", "hopscotch", "lucario",
from seoanalyzer import analyze import os from uniborg.util import friday_on_cmd from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="seo (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) await event.edit("processing please wait ") site = input_str try: cmd = "seoanalyze " + site + " --output-format html > seo.html" os.system(cmd) await event.client.send_file( event.chat_id, "seo.html", caption= f"**Site SEO Analysed Successfully\n\nNote: Open This File With Chrome Or Any Browser\n\n\nSite Analysed By Friday\nGet Your Friday From** @FRIDAYCHAT", ) com = "rm seo.html" os.system(com) await event.delete() except:
from anime_downloader.sites import get_anime_class from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="anime (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) lmao = input_str.split(":", 1) site = lmao[0] lol = lmao[1] why = site.lower() Twist = get_anime_class(why) search = Twist.search(lol) title1 = search[0].title url1 = search[0].url title2 = search[1].title url2 = search[1].url title3 = search[2].title url3 = search[2].url title4 = search[3].title url4 = search[3].url title5 = search[4].title url5 = search[4].url await event.edit(
img4 = ("https://telegra.ph/file/c9b14ac778ffbae2b8877.mp4") img5 = ("https://telegra.ph/file/4be0c8224a6b49b796505.mp4") img6 = ("https://telegra.ph/file/ee2bb9d5c4c41751c0cd1.mp4") img7 = ("https://telegra.ph/file/e982bd34bc29b2908a218.mp4") img8 = ("https://telegra.ph/file/f7b2555d6e5c11cd94d8f.mp4") img9 = ("https://telegra.ph/file/30df9bd45b861fd0f5773.mp4") img10 = ("https://telegra.ph/file/f5364c94795991747f9a7.mp4") img11 = ("https://telegra.ph/file/227dc0c3315061e25a5b4.mp4") img12 = ("https://telegra.ph/file/c3f47d45cf14ceb0c70f4.mp4") img13 = ("https://telegra.ph/file/3d3e86283953a292aef4a.mp4") img14 = ("https://telegra.ph/file/6311a00f207a1702183e2.mp4") img15 = ("https://telegra.ph/file/6a561f28fa2e3151e19ce.mp4") img16 = ("https://telegra.ph/file/2e6647c61f188addc10d6.mp4") @borg.on(admin_cmd(outgoing=True, pattern="baby")) async def _(event): if event.fwd_from: return await event.edit("SENDING...:-)") await asyncio.sleep(0.9) x = (random.randrange(1, 16)) if x == 1: await borg.send_file(event.chat_id, img1) await event.delete() if x == 2: await borg.send_file(event.chat_id, img2) await event.delete() if x == 3: await borg.send_file(event.chat_id, img3)
""" Speak a line... Command .carry By @The_Avengers_leader """ from telethon import events import asyncio import os import sys import random from fridaybot.utils import admin_cmd @borg.on(admin_cmd(pattern=r"carry$", outgoing=True)) async def _(event): if event.fwd_from: return await event.edit("speaking a line.......") await asyncio.sleep(2) x = (random.randrange(1, 25)) if x == 1: await event.edit("To Kaise Hai AAp Log??**") if x == 2: await event.edit("Mithai Ki Dukan Pe Leke Jaunga200 Me Bik Jayega ") if x == 3: await event.edit("Ab Aayega Maza Hmmmmmmm ") if x == 4: await event.edit( "Agar Ye Banda Cricket Mein Commentary KarnaShuru Kar De.. To Match Ka Kya Hoga" ) if x == 5: await event.edit("Tiktokers Ke Kanome Ek Hi Avaj ,To Kiase He Aap Log "
# Written By Inuka Asith for the VirtualUserbot # Exclusively written for VirtualUserbot # Credits goes to bot providers import asyncio from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern=r"purl ?(.*)")) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("**Reply to any document.**") return reply_message = await event.get_reply_message() chat = "@FileToLinkDXBot" reply_message.sender await event.edit("**Making public url...\n Powered by @VirtualUserbot**") async with event.client.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=1377765808)) await event.client.forward_messages(chat, reply_message) response = await response except YouBlockedUserError:
from telethon import events from fridaybot.utils import admin_cmd from fridaybot import CMD_HELP from var import Var # Non-SQL Mode ACC_LYDIA = {} SESSION_ID = {} if Var.LYDIA_API_KEY: api_key = Var.LYDIA_API_KEY api_client = API(api_key) lydia = LydiaAI(api_client) @borg.on(admin_cmd(pattern='rcf$')) async def repcf(event): if event.fwd_from: return await event.edit("Processing...") try: session = lydia.create_session() session_id = session.id reply = await event.get_reply_message() msg = reply.text text_rep = session.think_thought((session_id, msg)) await event.edit("💫 {0}".format(text_rep)) except Exception as e: await event.edit(str(e))
import secrets from fridaybot import sclient from fridaybot.utils import admin_cmd """This Is Only For Devs Of AntispamInc, Needs Root Permissions // @AntispamInc""" @borg.on(admin_cmd(pattern="benheck(?: |$)(.*)")) async def oki(event): await event.edit("`Processing...`") args = event.pattern_match.group(1).split(" ", 1) extra = None if event.reply_to_msg_id: previous_message = await event.get_reply_message() user = await event.client.get_entity(previous_message.sender_id) extra = event.pattern_match.group(1) elif args: userz = args[0] if userz.isnumeric(): user = int(userz) else: await event.edit("Provide User-ID Not Username.") return if len(args) == 2: extra = args[1] if extra == None: await event.edit("Reason Can't Be None") return elif extra == "": await event.edit("Reason Can't Be None") return
""" import asyncio import os import time import time as t import zipfile from datetime import datetime from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd extracted = Config.TMP_DOWNLOAD_DIRECTORY + "extracted/" thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg" @borg.on(admin_cmd("zip")) async def _(event): if event.fwd_from: return if not event.is_reply: await event.edit("Reply to a file to compress it. Bruh.") return mone = await event.edit("Processing ...") if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) if event.reply_to_msg_id: reply_message = await event.get_reply_message() try: downloaded_file_name = await borg.download_media( reply_message, Config.TMP_DOWNLOAD_DIRECTORY,
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. import secrets from random import * from password_strength import PasswordStats from uniborg.util import friday_on_cmd from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="passcheck (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) stats = PasswordStats(input_str) sedbruh = stats.strength() if stats.strength() >= 0.2: await event.edit( f"<b><u>Password Checked</b></u> \n<b>Password :</b> <code>{input_str}</code> \n<b>Strength :</b> <code>{sedbruh}</code> \n<b>Result :</b> <code>Good Password</code>", parse_mode="HTML", ) else: await event.edit( f"<b><u>Password Checked</b></u> \n<b>Password :</b> <code>{input_str}</code> \n<b>Strength :</b> <code>{sedbruh}</code> \n<b>Result :</b> <code>Bad Password</code>", parse_mode="HTML",
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. import requests from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd from fridaybot.Configs import Config @friday.on(admin_cmd(pattern="fpl")) async def _(event): if event.fwd_from: return if Config.FOOTBALL_API_KEY is None: await event.edit( "Need to get an API key from https://rapidapi.com/api-sports/api/api-football-beta\nModule stopping!" ) return appo = Config.FOOTBALL_API_KEY url = "https://api-football-beta.p.rapidapi.com/standings" querystring = {"season": "2020", "league": "39"} headers = { 'x-rapidapi-key': appo,
import os from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd, sudo_cmd @bot.on(admin_cmd(pattern=r"open", outgoing=True)) @bot.on(sudo_cmd(pattern=r"open")) async def _(event): b = await event.client.download_media(await event.get_reply_message()) a = open(b, "r") c = a.read() a.close() a = await event.reply("**Reading file...**") if len(c) > 4095: await a.edit( "`The Total words in this file is more than telegram limits.`") else: await event.client.send_message(event.chat_id, f"```{c}```") await a.delete() os.remove(b) CMD_HELP.update({ "open": ".open <reply to a file>\nUse - Read contents of file and send as a telegram message." })
from fridaybot.utils import admin_cmd @borg.on(admin_cmd(pattern=r"bid ?(.*)")) async def bid(event): giveVar = event.text bid = giveVar[4:5] if not bid: bid = "🙃" await event.edit( f"{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n\n{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}\n\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n\n {bid}{bid}{bid}{bid}{bid}\n {bid}{bid}{bid}{bid}{bid}{bid}{bid}\n {bid}{bid} {bid}{bid}\n {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n {bid}{bid} {bid}{bid}\n {bid}{bid} {bid}{bid}\n {bid}{bid}{bid}{bid}{bid}{bid}{bid}\n {bid}{bid}{bid}{bid}{bid}\n\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}" )
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from quote import quote from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="qs (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) result = quote(input_str, limit=3) sed = "" for quotes in result: sed += str(quotes["quote"]) + "\n\n" await event.edit( f"<b><u>Quotes Successfully Gathered for given word </b></u><code>{input_str}</code>\n\n\n<code>{sed}</code>", parse_mode="HTML", )
#Credit to @helloji123bot import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from platform import uname from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd B = ("▄︻╦芫≡══-------------➖") @borg.on(admin_cmd(pattern=r"awm")) async def bluedevilawm(awm): await awm.edit(B)
import requests from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="ekart (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) urlo = ( "https://track.aftership.com/trackings?courier=ekart&tracking-numbers=" + str(input_str)) url = "https://ekart-api-chi.vercel.app/check?id=" + str(input_str) r = requests.get(url) h = r.json() merchant = h.get("merchant_name") order_status = h.get("order_status") kk = h.get("updates") oqwz = kk[0] aq = oqwz.get("Date") ar = oqwz.get("Time") place = oqwz.get("Place") status = oqwz.get("Status") caption = f""" <b>Ekart Tracking </b> Merchant Name:- {merchant} Order Status:- {order_status} Tracking Id:- {input_str}
from uniborg.util import friday_on_cmd import flag import html from telethon.tl.functions.photos import GetUserPhotosRequest from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import MessageEntityMentionName from telethon.utils import get_input_location from fridaybot import CMD_HELP, sclient from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd, admin_cmd from countryinfo import CountryInfo @friday.on(admin_cmd(pattern="country (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) lol = input_str country = CountryInfo(lol) try: a = country.info() except: await event.edit("Country Not Avaiable Currently") name = a.get("name") bb = a.get("altSpellings") hu = '' for p in bb: hu += p + ", "
event.chat_id, "hits.txt", caption=f"**!VYPR HITS!** \n**HITS :** `{hits}` \n**BAD :** `{bads}`") os.remove("hits.txt") def find_between(s, first, last): try: start = s.index(first) + len(first) end = s.index(last, start) return s[start:end] except ValueError: return "" @friday.on(admin_cmd(pattern="proxy")) async def _(event): if event.fwd_from: return await event.edit( "CHECKING PROXIES... PLEASE WAIT. MAY TAKE TIME DEPENDING ON NUMBER OF PROXIES." ) pablo = await event.get_reply_message() escobar = await borg.download_media(pablo.media, Config.TMP_DOWNLOAD_DIRECTORY) cmd = f"python3 -m PyProxyToolkit.Console -i {escobar} -o goood.txt -t 80 -x 20 -s httpbinStrategy" os.system(cmd) file = open("goood.txt", "r")
download_video("SD", url, filename) def download_video(quality, url, filename): html = requests.get(url).content.decode('utf-8') video_url = re.search(rf'{quality.lower()}_src:"(.+?)"', html).group(1) file_size_request = requests.get(video_url, stream=True) file_size = int(file_size_request.headers['Content-Length']) block_size = 1024 with open(filename + '.mp4', 'wb') as f: for data in file_size_request.iter_content(block_size): f.write(data) print("\nVideo downloaded successfully.") @friday.on(admin_cmd(pattern="fbdl (.*)")) async def _(event): if event.fwd_from: return while True: url = event.pattern_match.group(1) x = re.match(r'^(https:|)[/][/]www.([^/]+[.])*facebook.com', url) if x: html = requests.get(url).content.decode('utf-8') else: await event.edit( "This Video Is Either Private Or URL Is Invalid. Exiting... ") return _qualityhd = re.search('hd_src:"https', html)
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. import requests from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd from fridaybot.Configs import Config @friday.on(admin_cmd(pattern="fpl")) async def _(event): if event.fwd_from: return if Config.FOOTBALL_API_KEY is None: await event.edit( "Need to get an API key from https://rapidapi.com/api-sports/api/api-football-beta\nModule stopping!" ) return appo = Config.FOOTBALL_API_KEY url = "https://api-football-beta.p.rapidapi.com/standings" querystring = {"season": "2020", "league": "39"} headers = { 'x-rapidapi-key': appo,
img3 = "https://telegra.ph/file/4bd1c7c5753d4ed0c8375.jpg" img4 = "https://telegra.ph/file/14cce3615b07141f94918.jpg" img5 = "https://telegra.ph/file/b02006e54549aa2a84a18.jpg" img6 = "https://telegra.ph/file/6483530fffe7d5bb1d16b.jpg" img7 = "https://telegra.ph/file/5ed9ecc0f8bcd4f4ebea0.jpg" img8 = "https://telegra.ph/file/35d3c84098cf56897418c.jpg" img9 = "https://telegra.ph/file/3f20d84c3c682fe24ff97.jpg" img10 = "https://telegra.ph/file/09e017a1898fa1f46294c.jpg" img11 = "https://telegra.ph/file/46e7596fcc5e42b150e68.jpg" img12 = "https://telegra.ph/file/a7113b4b047d18dca9793.jpg" img13 = "https://telegra.ph/file/012bcdfeae8029337642b.jpg" img14 = "https://telegra.ph/file/3b671ab3b4f07025b6f01.jpg" img15 = "https://telegra.ph/file/34ba55eb1543578a1fc92.jpg" @borg.on(admin_cmd(outgoing=True, pattern="mmh")) async def _(event): if event.fwd_from: return await event.edit("SENDING...:-)") await asyncio.sleep(0.9) x = (random.randrange(1, 15)) if x == 1: await borg.send_file(event.chat_id, img1) await event.delete() if x == 2: await borg.send_file(event.chat_id, img2) await event.delete() if x == 3: await borg.send_file(event.chat_id, img3) await event.delete()
import requests from uniborg.util import friday_on_cmd import html from telethon.tl.functions.photos import GetUserPhotosRequest from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import MessageEntityMentionName from telethon.utils import get_input_location from fridaybot.Configs import Config from fridaybot import CMD_HELP, sclient from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd, admin_cmd @friday.on(admin_cmd(pattern="hero (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) url = "https://superhero-search.p.rapidapi.com/" querystring = {"hero": input_str} if Config.SUPERHERO_API_KEY is None: await event.edit("Need to get an API key from https://rapidapi.com/jakash1997/api/superhero-search\nModule stopping!") return await event.edit("Processing Your Request.") inputo = Config.SUPERHERO_API_KEY headers = { 'x-rapidapi-key': inputo, 'x-rapidapi-host': "superhero-search.p.rapidapi.com"
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. import requests import os import re import sys from bs4 import BeautifulSoup from urllib.request import Request, urlopen, urlretrieve from uniborg.util import friday_on_cmd from fridaybot import CMD_HELP from fridaybot.utils import admin_cmd @friday.on(admin_cmd(pattern="book (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) lool = 0 await event.edit("searching for the book...") lin = "https://b-ok.cc/s/" text = input_str link = lin+text headers = ['User-Agent','Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0'] page = requests.get(link) soup = BeautifulSoup(page.content, 'html.parser') f = open("book.txt",'w') total = soup.find(class_="totalCounter")