From 32c117f8f19adc1467746f96b396a226c3997b08 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Thu, 4 Nov 2021 10:27:21 +0530 Subject: [PATCH 01/14] Update bot.py --- bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 98690a3..2e661dc 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,7 @@ async def start(bot, message): await message.reply( f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [Mr Punisher](https://t.me/mrpunisher52)") + "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [King Sameer](https://t.me/king_sameer_014)") @bot.on_message(filters.text & filters.private) @@ -149,7 +149,8 @@ async def addFooter(str): โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ Join Our Main Channel - @hornyworld22 - Our meme channel - @desi_memez + meme channel - + @desi_memez โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ โญ๏ธJOIN CHANNEL โžก๏ธ t.me/""" + CHANNEL From 019041fe675f32c98a81e18b08e4709906c7f9c8 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:24:55 +0530 Subject: [PATCH 02/14] Update bot.py --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 2e661dc..9567013 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,7 @@ async def start(bot, message): await message.reply( f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [King Sameer](https://t.me/king_sameer_014)") + "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [Mr Punisher](https://t.me/mrpunisher52)") @bot.on_message(filters.text & filters.private) @@ -84,7 +84,7 @@ async def get_ptitle(url): async def pdisk_up(link): - if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers'): + if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers'or link in 'dplinks): res = await get_ptitle(link) title_pdisk = res[0] link = res[1] From 65503cf6c2ba7c921c044806d54c32aadf49b116 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:27:36 +0530 Subject: [PATCH 03/14] Update bot.py --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 9567013..d5c3ac4 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,7 @@ async def start(bot, message): await message.reply( f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [Mr Punisher](https://t.me/mrpunisher52)") + "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [@hornyworld22] @bot.on_message(filters.text & filters.private) From c5535629029eeb38addf4ef62bf260825024a451 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:29:31 +0530 Subject: [PATCH 04/14] Update bot.py --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index d5c3ac4..e95fbd5 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,7 @@ async def start(bot, message): await message.reply( f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [@hornyworld22] + "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ @hornyworld22 @bot.on_message(filters.text & filters.private) From 4e88f86d8187a83c1bb1315c690a3f0d2f201ade Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:31:40 +0530 Subject: [PATCH 05/14] Update bot.py --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index e95fbd5..384a11c 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,7 @@ async def start(bot, message): await message.reply( f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ @hornyworld22 + "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ @hornyworld22 ") @bot.on_message(filters.text & filters.private) From ff3d2c547a9815310c158bcd1d108ba1f64a1899 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:33:25 +0530 Subject: [PATCH 06/14] Update bot.py --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 384a11c..6c50921 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,7 @@ async def start(bot, message): await message.reply( f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ @hornyworld22 ") + "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [King Sameer](https://t.me/king_sameer_014)") @bot.on_message(filters.text & filters.private) From b968616515dde34dcf95a6d187d5275b319b49fc Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:35:27 +0530 Subject: [PATCH 07/14] Update bot.py --- bot.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index 6c50921..df79a73 100644 --- a/bot.py +++ b/bot.py @@ -84,7 +84,7 @@ async def get_ptitle(url): async def pdisk_up(link): - if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers'or link in 'dplinks): + if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers'): res = await get_ptitle(link) title_pdisk = res[0] link = res[1] @@ -147,10 +147,7 @@ async def remove_username(new_List): async def addFooter(str): footer = """ โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ - Join Our Main Channel - @hornyworld22 - - meme channel - - @desi_memez + Droplink tutorial - https://t.me/hornyworld22/13 โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ โญ๏ธJOIN CHANNEL โžก๏ธ t.me/""" + CHANNEL From 39a284419505e9fea80efcaf282e77cd2fd747f6 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 09:43:06 +0530 Subject: [PATCH 08/14] Update bot.py --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index df79a73..bba68bc 100644 --- a/bot.py +++ b/bot.py @@ -84,7 +84,7 @@ async def get_ptitle(url): async def pdisk_up(link): - if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers'): + if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers' or link in 'dplinks'): res = await get_ptitle(link) title_pdisk = res[0] link = res[1] From 4d1204e7cc075cd70efb4cfc49401a9d4f2efd88 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Fri, 5 Nov 2021 10:04:43 +0530 Subject: [PATCH 09/14] Update bot.py --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index bba68bc..3ecb1d5 100644 --- a/bot.py +++ b/bot.py @@ -84,7 +84,7 @@ async def get_ptitle(url): async def pdisk_up(link): - if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers' or link in 'dplinks'): + if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers' or link in 'dplinks' or link in 'droppx'): res = await get_ptitle(link) title_pdisk = res[0] link = res[1] From 9d2b05f73257c89abafeb77087d1f25ea993bb83 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Mon, 21 Feb 2022 21:49:00 +0530 Subject: [PATCH 10/14] Update bot.py --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 3ecb1d5..d375eeb 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,7 @@ async def start(bot, message): await message.reply( f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š ๐๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [King Sameer](https://t.me/king_sameer_014)") + "๐ˆ'๐ฆ ๐š M๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [Mr Punisher](https://t.me/mrpunisher52)") @bot.on_message(filters.text & filters.private) From 058825d0a27186be2da89e815945caf7910a2760 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Mon, 21 Feb 2022 22:05:04 +0530 Subject: [PATCH 11/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f7d9b7..04d04f1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Make short link by using [๐๐๐ข๐ฌ๐ค](https://www.cofilink.com/use-api #### ๐“๐ก๐ž ๐„๐š๐ฌ๐ฒ ๐–๐š๐ฒ -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/truexdice/PdiskVideoBot) +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://github.com/Pdiskbot/PdiskVideoBot) ##### ๐‘๐ž๐ช๐ฎ๐ข๐ซ๐ž๐ ๐•๐š๐ซ๐ข๐š๐›๐ฅ๐ž๐ฌ From 6947d1fe7dc02c1241669781a6d1fcb35349d1d3 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Wed, 8 Jun 2022 14:23:33 +0530 Subject: [PATCH 12/14] Update bot.py --- bot.py | 676 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 523 insertions(+), 153 deletions(-) diff --git a/bot.py b/bot.py index d375eeb..c3ff748 100644 --- a/bot.py +++ b/bot.py @@ -1,156 +1,526 @@ -from os import environ -import os -import time -from urllib.parse import urlparse -import aiohttp -from pyrogram import Client, filters -from bs4 import BeautifulSoup -import requests import re +from time import sleep +import requests +from telethon import TelegramClient , events +import os +from telethon.sessions import StringSession + + +id= 14295855 +hash = "d7c97d558577a8633485c557a41174ef" + +print("Starting Deployment..!") +client = TelegramClient("main2str" , api_id=id , api_hash=hash) + +#mdiskapi +mdisk_api = 'jNgyWyCG2KK4tvh5RVFX' +sapi= '1832790492-eakHGycryH' +#footer +footer = '''\nโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ +โญ๏ธJOIN OUR BACKUP CHANNEL +โžก๏ธhttps://t.me/+tczP8AvZheRjMTA1''' + +black = ["Adult Whatsapp Group Join Karne Ke Liye Click Kare ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡","Gb Whatsapp Download Karne Ke Liye Click Kare ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡","Please Join Our Backup Channel :-","https://www.instagram.com/haq.sebakchodi/","๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡","โคEarning app๐Ÿค‘๐Ÿค‘","http://share.royalgame.in?invite_code784297","๐Ÿ’Ÿ๐—•๐—˜๐—ฆ๐—ง ๐—˜๐—”๐—ฅ๐—ก๐—œ๐—ก๐—š ๐—”๐—ฃ๐—ฃ","https://www.boow.in/agent-74-1782101","โญJOIN OUR BACKUP CHANNEL","โžก","Must watch guys๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ","Join backup channel ๐Ÿ‘‡","Cricket fans ke liye bahut sunhara mauka khele free contest and win kre daily 1lac","Is IPL season daily 1000k","prize ๐Ÿ†","https://assets-1.mdisk.me/assets/apk/Winner11-1.02.apk","โคJoin Channelโค","โžก๏ธ","โญ๏ธJOIN OUR BACKUP CHANNEL","Aagya INDIA'S 1st FREE WINNING Fantasy APP","Visit :- www.winner11.net","Install now ๐Ÿ‘‡","https://mdisk.me/convertor/203x360/jn2SYC","@ EZINETWORK","Must watch ๐Ÿคฉ๐Ÿคฉ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ","Join Our Telegram Backup Channel In Case This Channel Delete Please Join It Please๐Ÿ‘‡๐Ÿ‘‡","Must watch Guys ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ","Enjoy it โคโคโค","โ™จ๏ธ ๐™ณ๐™พ๐š†๐™ฝ๐™ป๐™พ๐™ฐ๐™ณ ๐™บ๐™ฐ๐š๐™ฝ๐™ด ๐™ฝ๐™ฐ๐™ท๐™ธ ๐™ฐ๐™ฐ๐š๐™ฐ ๐šƒ๐™พ๐™ท ๐™ฟ๐™ธ๐™ฝ๐™ฝ๐™ด๐™ณ ๐™ผ๐™ด๐š‚๐š‚๐™ฐ๐™ถ๐™ด ๐™ฒ๐™ท๐™ด๐™ฒ๐™บ ๐™บ๐™ฐ๐š๐™พ","๐Ÿ‘‰ ๐Ÿ…ฑ๐Ÿ…ฐ๐Ÿ…ฒ๐Ÿ…บ๐Ÿ†„๐Ÿ…ฟ ๐Ÿ…ฒ๐Ÿ…ท๐Ÿ…ฐ๐Ÿ…ฝ๐Ÿ…ฝ๐Ÿ…ด๐Ÿ…ป","=" ,"โ—โ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ—" ,"๐Ÿ”ฅBackup file๐Ÿ”ฅ" ,"๐Ÿ”ฅJoin channel ๐Ÿ”ฅ" ,"JOIN CHANNEL ๐Ÿ‘‡" ,"Join adult network๐ŸŒ๐Ÿ’ฆ" ,"SHARE OUR CHANNEL๐Ÿ‘‡" ,"๐—ง๐—ฒ๐—น๐—ฒ๐—ด๐—ฟ๐—ฎ๐—บ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น" ,"๐‰๐Ž๐ˆ๐ ๐”๐’ โžช" ,"๐Ÿ™†โ€โ™€ Join Our Backup:- ","Join now best channel" ,"โ™จ๏ธ SEARCH & JOIN NOW๐Ÿ‘‡","โ˜†โ˜†โ˜†โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ˜†โ˜†โ˜†","โžฅ"] + +##### ios new + +# iosNewS = [-1001320268729,-1001269643652,-1001592280578,-1001725626602,-1001736624413] +iosNewD = -1001146630538 + +#eng variables +indchats = [-1001679399038,-1001599913233,-1001794604239,-1001316413287,-1001665192861,-1001626636022,-1001168213397,-1001708628164,-1001562499878,-1001493682832] +indsend_to1 = -1001607066545 + + +#webseries var +webchat = [-1001615368632,-1001593607523,-1001028498885,-1001708829219,-1001421452039,-1001725626602,-1001115164915,-1001663893158] +websend_to = -1001621269851 + +#desi vars +deschat = [-1001711248489,-1001541608805,-1001767045981,-1001303095255,-1001314689320,-1001387860550,-1001250363281,-1001314689320,-1001138671226,-1001461291601] +dessend_to = -1001754232236 + +#tango vars +tanchat = [-1001330259957,-1001785029855,-1001745646849,-1001577675291,-1001568191558,-1001589153647] +tansend_to = -1001591226590 + -API_ID = environ.get('API_ID') -API_HASH = environ.get('API_HASH') -BOT_TOKEN = environ.get('BOT_TOKEN') -PDISK_API_KEY = environ.get('PDISK_API_KEY') -THUMB_URL = environ.get('THUMB_URL', 'https://telegra.ph/file/7fe26cab6dd5057cf01d5.jpg') -CHANNEL = environ.get('CHANNEL') -bot = Client('pdisk bot', - api_id=API_ID, - api_hash=API_HASH, - bot_token=BOT_TOKEN, - workers=50, - sleep_threshold=0) - - -@bot.on_message(filters.command('start') & filters.private) -async def start(bot, message): - await message.reply( - f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" - "๐ˆ'๐ฆ ๐š M๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [Mr Punisher](https://t.me/mrpunisher52)") - - -@bot.on_message(filters.text & filters.private) -async def pdisk_uploader(bot, message): - new_string = str(message.text) - try: - pdisk_link = await multi_pdisk_up(new_string) - await message.reply(f'{pdisk_link}', quote=True) - except Exception as e: - await message.reply(f'Error: {e}', quote=True) - - -@bot.on_message(filters.photo & filters.private) -async def pdisk_uploader(bot, message): - new_string = str(message.caption) - try: - pdisk_link = await multi_pdisk_up(new_string) - if(len(pdisk_link) > 1020): - await message.reply(f'{pdisk_link}', quote=True) +#onlyfans vars +onchat = [-1001608452561,-1001199943325,-1001491824023] +onsend_to = -1001654275627 + + +sf1 = [-1001675910285] +df1 = -1001565160237 + +sfoot = "https://t.me/Watch_Streaam_Links/9\nโž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž– \n๐Ÿ”ž For More Hot Content @X3Links" + +############### ENGLISH 1 ########## + +@client.on(events.NewMessage(chats=indchats)) +async def hello1(event): + + # chat = await event.get_chat() + caption = event.message.message + urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) + if(urls_to_change): + try: + media = await client.download_media(event.message) + except: + media = False + print("no media") + # this is for blacklist word + + caption = re.sub("hehe" , "" , caption) + + caption = re.sub("hoho" , "" , caption) + caption = re.sub("๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡" , "" , caption) + caption = re.sub("https://www.instagram.com/haq.sebakchodi/" , "" , caption) + caption = re.sub("https://t.me/open_streaam/14" , "https://t.me/Watch_Streaam_Links/9" , caption) + + + + caption = re.sub("@.*" , "@X3Links" , caption) + caption = re.sub("https://t.me/.*" , "@X3Links" , caption) + caption = re.sub("t.me/.*" , "@X3Links" , caption) + caption = re.sub("T.me/.*" , "@X3Links" , caption) + for i in black: + caption = re.sub(i, "" , caption) + + regrex_pattern = re.compile(pattern = "[" + u"\U0001F600-\U0001F64F" # emoticons + u"\U0001F300-\U0001F5FF" # symbols & pictographs + u"\U0001F680-\U0001F6FF" # transport & map symbols + u"\U0001F1E0-\U0001F1FF" # flags (iOS) + "]+", flags = re.UNICODE) + + # url to change + for i in urls_to_change: + link = regrex_pattern.sub(r'' , i) + #print(link) + url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' + param = { + 'token': mdisk_api, + 'link':link.strip() + } + try: + res = requests.post(url, json = param) + except: + print("error in res") + return + try: + shareLink = res.json()['sharelink'] + except: + print("error in share") + shareLink = "" + # print("changed link : " , shareLink) + caption = re.sub(link , shareLink , caption) + # print(caption) + sleep(0.2) + caption = caption + "\n" + if media: + await client.send_file(indsend_to1,file=media , caption=caption) + os.remove(media) else: - await bot.send_photo(message.chat.id, message.photo.file_id, caption=f'{pdisk_link}') - except Exception as e: - await message.reply(f'Error: {e}', quote=True) - - -async def get_ptitle(url): - html_text = requests.get(url).text - soup = BeautifulSoup(html_text, 'html.parser') - for title in soup.find_all('title'): - pass - title = list(title.get_text()) - title = title[8:] - str = '@' + CHANNEL + ' ' - for i in title: - str = str + i - lst = list(html_text.split(",")) - c = 0 - for i in lst: - if ("""videoid""" in i): - found = lst[c] - break - c += 1 - - # pdisk.net link - pdisk_video_id = list(found.split(":")) - video_id = pdisk_video_id[2] - video_id = list(video_id.split(",")) - v_id = video_id[0] - v_len = len(v_id) - v_id = v_id[1:v_len - 2] - - v_url = 'https://www.pdisks.com/share-video?videoid=' + v_id - res = [str, v_url] - return res - - -async def pdisk_up(link): - if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers' or link in 'dplinks' or link in 'droppx'): - res = await get_ptitle(link) - title_pdisk = res[0] - link = res[1] - else: - title_new = urlparse(link) - title_new = os.path.basename(title_new.path) - title_pdisk = '@' + CHANNEL + title_new - res = requests.get( - 'http://linkapi.net/open/create_item?link_type=link&content_src=' + link + '&source=2000&cover_url='+THUMB_URL+'&api_key=' + PDISK_API_KEY + '&dir_id=0&title=' + title_pdisk + '&description=Join_' + CHANNEL + '_for_more_like_this') - data = res.json() - data = dict(data) - print(data) - v_id = data['data']['item_id'] - v_url = 'https://www.pdisk.me/share-video?videoid=' + v_id - return (v_url) - - -async def multi_pdisk_up(ml_string): - new_ml_string = list(map(str, ml_string.split(" "))) - new_ml_string = await remove_username(new_ml_string) - new_join_str = "".join(new_ml_string) - - urls = re.findall(r'(https?://[^\s]+)', new_join_str) - - nml_len = len(new_ml_string) - u_len = len(urls) - url_index = [] - count = 0 - for i in range(nml_len): - for j in range(u_len): - if (urls[j] in new_ml_string[i]): - url_index.append(count) - count += 1 - new_urls = await new_pdisk_url(urls) - url_index = list(dict.fromkeys(url_index)) - i = 0 - for j in url_index: - new_ml_string[j] = new_ml_string[j].replace(urls[i], new_urls[i]) - i += 1 - - new_string = " ".join(new_ml_string) - return await addFooter(new_string) - - -async def new_pdisk_url(urls): - new_urls = [] - for i in urls: - time.sleep(0.2) - new_urls.append(await pdisk_up(i)) - return new_urls - - -async def remove_username(new_List): - for i in new_List: - if('@' in i or 't.me' in i or 'https://bit.ly/3m4gabB' in i or 'https://bit.ly/pdisk_tuts' in i or 'telegra.ph' in i): - new_List.remove(i) - return new_List - - -async def addFooter(str): - footer = """ -โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ - Droplink tutorial - https://t.me/hornyworld22/13 -โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ - -โญ๏ธJOIN CHANNEL โžก๏ธ t.me/""" + CHANNEL - return str + footer - -bot.run() + await client.send_message(indsend_to1, caption) + + + + ############### IOS ########## + +@client.on(events.NewMessage(chats=deschat)) +async def hello2(event): + # chat = await event.get_chat() + caption = event.message.message + urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) + if(urls_to_change): + try: + media = await client.download_media(event.message) + except: + media = False + print("no media") + # this is for blacklist word + + caption = re.sub("hehe" , "" , caption) + + caption = re.sub("hoho" , "" , caption) + caption = re.sub("๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡" , "" , caption) + caption = re.sub("https://www.instagram.com/haq.sebakchodi/" , "" , caption) + caption = re.sub("https://t.me/open_streaam/14" , "" , caption) + + + + caption = re.sub("@.*" , "@X3Links" , caption) + caption = re.sub("https://t.me/.*" , "@X3Links" , caption) + caption = re.sub("t.me/.*" , "@X3Links" , caption) + caption = re.sub("T.me/.*" , "@X3Links" , caption) + for i in black: + caption = re.sub(i, "" , caption) + + regrex_pattern = re.compile(pattern = "[" + u"\U0001F600-\U0001F64F" # emoticons + u"\U0001F300-\U0001F5FF" # symbols & pictographs + u"\U0001F680-\U0001F6FF" # transport & map symbols + u"\U0001F1E0-\U0001F1FF" # flags (iOS) + "]+", flags = re.UNICODE) + + # url to change + for i in urls_to_change: + link = regrex_pattern.sub(r'' , i) + #print(link) + url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' + param = { + 'token': mdisk_api, + 'link':link.strip() + } + try: + res = requests.post(url, json = param) + except: + print("error in res") + return + try: + shareLink = res.json()['sharelink'] + except: + print("error in share") + shareLink = "" + # print("changed link : " , shareLink) + caption = re.sub(link , shareLink , caption) + # print(caption) + sleep(0.2) + caption = caption + "\n" + if media: + await client.send_file(iosNewD,file=media , caption=caption) + os.remove(media) + else: + await client.send_message(iosNewD, caption) + + + + ##################### WEBSERIES ############# + +@client.on(events.NewMessage(chats=webchat)) +async def hello3(event): + # chat = await event.get_chat() + caption = event.message.message + # link syntax = https://streaam.net/S/$UydxddrFxb + urls_to_change = re.findall('https?://streaam.net/S/.*' , caption) + # print(urls_to_change) + if(urls_to_change): + try: + media = await client.download_media(event.message) + except: + media = False + print("no media") + # this is for blacklist word + + caption = re.sub("hehe" , "" , caption) + caption = re.sub("hoho" , "" , caption) + caption = re.sub("๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡" , "" , caption) + caption = re.sub("https://www.instagram.com/haq.sebakchodi/" , "" , caption) + + caption = re.sub("@.*" , "" , caption) + caption = re.sub("https://t.me/.*" , "" , caption) + caption = re.sub("t.me/.*" , "" , caption) + caption = re.sub("T.me/.*" , "" , caption) + for i in black: + caption = re.sub(i, "" , caption) + + regrex_pattern = re.compile(pattern = "[" + u"\U0001F600-\U0001F64F" # emoticons + u"\U0001F300-\U0001F5FF" # symbols & pictographs + u"\U0001F680-\U0001F6FF" # transport & map symbols + u"\U0001F1E0-\U0001F1FF" # flags (iOS) + "]+", flags = re.UNICODE) + + # url to change + for i in urls_to_change: + link = regrex_pattern.sub(r'' , i) + linkid = link.split("/")[-1] + # print(linkid) + key = sapi + url = f'https://api.streaam.net/save?linkid={linkid}&key={key}' + # print(url) + # param = { + # 'token': mdisk_api, + # 'link':link.strip() + # } + try: + res = requests.get(url) + except: + print("error in res") + return + try: + shareLink = res.json()['link'] + except: + print("error in share") + shareLink = "" + print("changed link : " , shareLink) + caption = re.sub(re.escape(i) , shareLink , caption) + # print(caption) + # sleep(0.2) + caption = caption +sfoot + if media: + await client.send_file(websend_to ,file=media , caption=caption) + os.remove(media) + else: + await client.send_message(websend_to , caption) + + + +############ TANGO ############### + +@client.on(events.NewMessage(chats=tanchat)) +async def hello5(event): + # chat = await event.get_chat() + caption = event.message.message + urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) + if(urls_to_change): + try: + media = await client.download_media(event.message) + except: + media = False + print("no media") + # this is for blacklist word + caption = re.sub("hehe" , "" , caption) + caption = re.sub("hoho" , "" , caption) + + + caption = re.sub("@.*" , "@X3Links" , caption) + caption = re.sub("https://t.me/.*" , "@X3Links" , caption) + caption = re.sub("t.me/.*" , "@X3Links" , caption) + caption = re.sub("T.me/.*" , "@X3Links" , caption) + for i in black: + caption = re.sub(i, "" , caption) + + regrex_pattern = re.compile(pattern = "[" + u"\U0001F600-\U0001F64F" # emoticons + u"\U0001F300-\U0001F5FF" # symbols & pictographs + u"\U0001F680-\U0001F6FF" # transport & map symbols + u"\U0001F1E0-\U0001F1FF" # flags (iOS) + "]+", flags = re.UNICODE) + + # url to change + for i in urls_to_change: + link = regrex_pattern.sub(r'' , i) + #print(link) + url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' + param = { + 'token': mdisk_api, + 'link':link.strip() + } + try: + res = requests.post(url, json = param) + except: + print("error in res") + return + try: + shareLink = res.json()['sharelink'] + except: + print("error in share") + shareLink = "" + # print("changed link : " , shareLink) + caption = re.sub(link , shareLink , caption) + # print(caption) + sleep(0.2) + caption = caption + "\n" + footer + if media: + await client.send_file(tansend_to ,file=media , caption=caption) + os.remove(media) + else: + await client.send_message(tansend_to , caption) + + + + + +############ Desi ############### + +@client.on(events.NewMessage(chats=deschat)) +async def hello55(event): + # chat = await event.get_chat() + caption = event.message.message + urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) + if(urls_to_change): + try: + media = await client.download_media(event.message) + except: + media = False + print("no media") + # this is for blacklist word + caption = re.sub("hehe" , "" , caption) + caption = re.sub("hoho" , "" , caption) + + + caption = re.sub("@.*" , "@X3Links" , caption) + caption = re.sub("https://t.me/.*" , "@X3Links" , caption) + caption = re.sub("t.me/.*" , "@X3Links" , caption) + caption = re.sub("T.me/.*" , "@X3Links" , caption) + for i in black: + caption = re.sub(i, "" , caption) + + regrex_pattern = re.compile(pattern = "[" + u"\U0001F600-\U0001F64F" # emoticons + u"\U0001F300-\U0001F5FF" # symbols & pictographs + u"\U0001F680-\U0001F6FF" # transport & map symbols + u"\U0001F1E0-\U0001F1FF" # flags (iOS) + "]+", flags = re.UNICODE) + + # url to change + for i in urls_to_change: + link = regrex_pattern.sub(r'' , i) + #print(link) + url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' + param = { + 'token': mdisk_api, + 'link':link.strip() + } + try: + res = requests.post(url, json = param) + except: + print("error in res") + return + try: + shareLink = res.json()['sharelink'] + except: + print("error in share") + shareLink = "" + # print("changed link : " , shareLink) + caption = re.sub(link , shareLink , caption) + # print(caption) + sleep(0.2) + caption = caption + "\n" + footer + if media: + await client.send_file(deschat_to ,file=media , caption=caption) + os.remove(media) + else: + await client.send_message(deschat_to , caption) + +########### ONLYFANS ##################### +@client.on(events.NewMessage(chats=onchat)) +async def hello6(event): + # chat = await event.get_chat() + caption = event.message.message + urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) + if(urls_to_change): + try: + media = await client.download_media(event.message) + except: + media = False + print("no media") + # this is for blacklist word + caption = re.sub("hehe" , "" , caption) + caption = re.sub("hoho" , "" , caption) + + + caption = re.sub("@.*" , "@X3Links" , caption) + caption = re.sub("https://t.me/.*" , "@X3Links" , caption) + caption = re.sub("t.me/.*" , "@X3Links" , caption) + caption = re.sub("T.me/.*" , "@X3Links" , caption) + for i in black: + caption = re.sub(i, "" , caption) + + regrex_pattern = re.compile(pattern = "[" + u"\U0001F600-\U0001F64F" # emoticons + u"\U0001F300-\U0001F5FF" # symbols & pictographs + u"\U0001F680-\U0001F6FF" # transport & map symbols + u"\U0001F1E0-\U0001F1FF" # flags (iOS) + "]+", flags = re.UNICODE) + + # url to change + for i in urls_to_change: + link = regrex_pattern.sub(r'' , i) + #print(link) + url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' + param = { + 'token': mdisk_api, + 'link':link.strip() + } + try: + res = requests.post(url, json = param) + except: + print("error in res") + return + try: + shareLink = res.json()['sharelink'] + except: + print("error in share") + shareLink = "" + # print("changed link : " , shareLink) + caption = re.sub(link , shareLink , caption) + # print(caption) + sleep(0.2) + caption = caption + "\n" + footer + if media: + await client.send_file(onsend_to ,file=media , caption=caption) + os.remove(media) + else: + await client.send_message(onsend_to , caption) + + + +########################convert it +@client.on(events.NewMessage(chats=sf1)) +async def hello7(event): + # chat = await event.get_chat() + caption = event.message.message + urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) + if(urls_to_change): + try: + media = await client.download_media(event.message) + except: + media = False + print("no media") + # this is for blacklist word + caption = re.sub("hehe" , "" , caption) + caption = re.sub("hoho" , "" , caption) + + + caption = re.sub("@.*" , "" , caption) + caption = re.sub("https://t.me/.*" , "" , caption) + caption = re.sub("t.me/.*" , "" , caption) + caption = re.sub("T.me/.*" , "" , caption) + for i in black: + caption = re.sub(i, "" , caption) + + regrex_pattern = re.compile(pattern = "[" + u"\U0001F600-\U0001F64F" # emoticons + u"\U0001F300-\U0001F5FF" # symbols & pictographs + u"\U0001F680-\U0001F6FF" # transport & map symbols + u"\U0001F1E0-\U0001F1FF" # flags (iOS) + "]+", flags = re.UNICODE) + + # url to change + for i in urls_to_change: + link = regrex_pattern.sub(r'' , i) + #print(link) + url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' + param = { + 'token': 'C2IGtPmGWkVoKaa0aPoy', + 'link':link.strip() + } + try: + res = requests.post(url, json = param) + except: + print("error in res") + return + try: + shareLink = res.json()['sharelink'] + except: + print("error in share") + shareLink = "" + # print("changed link : " , shareLink) + caption = re.sub(link , shareLink , caption) + # print(caption) + sleep(0.2) + caption = caption + "\n" + if media: + await client.send_file(df1 ,file=media , caption=caption) + os.remove(media) + else: + await client.send_message(df1 , caption) + + +print("Bot has been deployed.!") + +client.start() +client.run_until_disconnected() From 15527ef7999622dc415b3ddd9acd0232f615e848 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Wed, 8 Jun 2022 14:29:52 +0530 Subject: [PATCH 13/14] Create heroku.yml --- heroku.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 heroku.yml diff --git a/heroku.yml b/heroku.yml new file mode 100644 index 0000000..8eec25b --- /dev/null +++ b/heroku.yml @@ -0,0 +1,3 @@ +build: + docker: + web: Dockerfile From 53ee57008e21fff19f2cb4c18cba16f7cb0e1c16 Mon Sep 17 00:00:00 2001 From: Pdiskbot <93695686+Pdiskbot@users.noreply.github.com> Date: Wed, 8 Jun 2022 14:41:33 +0530 Subject: [PATCH 14/14] Update bot.py --- bot.py | 676 +++++++++++++-------------------------------------------- 1 file changed, 153 insertions(+), 523 deletions(-) diff --git a/bot.py b/bot.py index c3ff748..d375eeb 100644 --- a/bot.py +++ b/bot.py @@ -1,526 +1,156 @@ -import re -from time import sleep -import requests -from telethon import TelegramClient , events +from os import environ import os -from telethon.sessions import StringSession - - -id= 14295855 -hash = "d7c97d558577a8633485c557a41174ef" - -print("Starting Deployment..!") -client = TelegramClient("main2str" , api_id=id , api_hash=hash) - -#mdiskapi -mdisk_api = 'jNgyWyCG2KK4tvh5RVFX' -sapi= '1832790492-eakHGycryH' -#footer -footer = '''\nโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ -โญ๏ธJOIN OUR BACKUP CHANNEL -โžก๏ธhttps://t.me/+tczP8AvZheRjMTA1''' - -black = ["Adult Whatsapp Group Join Karne Ke Liye Click Kare ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡","Gb Whatsapp Download Karne Ke Liye Click Kare ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡","Please Join Our Backup Channel :-","https://www.instagram.com/haq.sebakchodi/","๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡","โคEarning app๐Ÿค‘๐Ÿค‘","http://share.royalgame.in?invite_code784297","๐Ÿ’Ÿ๐—•๐—˜๐—ฆ๐—ง ๐—˜๐—”๐—ฅ๐—ก๐—œ๐—ก๐—š ๐—”๐—ฃ๐—ฃ","https://www.boow.in/agent-74-1782101","โญJOIN OUR BACKUP CHANNEL","โžก","Must watch guys๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ","Join backup channel ๐Ÿ‘‡","Cricket fans ke liye bahut sunhara mauka khele free contest and win kre daily 1lac","Is IPL season daily 1000k","prize ๐Ÿ†","https://assets-1.mdisk.me/assets/apk/Winner11-1.02.apk","โคJoin Channelโค","โžก๏ธ","โญ๏ธJOIN OUR BACKUP CHANNEL","Aagya INDIA'S 1st FREE WINNING Fantasy APP","Visit :- www.winner11.net","Install now ๐Ÿ‘‡","https://mdisk.me/convertor/203x360/jn2SYC","@ EZINETWORK","Must watch ๐Ÿคฉ๐Ÿคฉ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ","Join Our Telegram Backup Channel In Case This Channel Delete Please Join It Please๐Ÿ‘‡๐Ÿ‘‡","Must watch Guys ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ","Enjoy it โคโคโค","โ™จ๏ธ ๐™ณ๐™พ๐š†๐™ฝ๐™ป๐™พ๐™ฐ๐™ณ ๐™บ๐™ฐ๐š๐™ฝ๐™ด ๐™ฝ๐™ฐ๐™ท๐™ธ ๐™ฐ๐™ฐ๐š๐™ฐ ๐šƒ๐™พ๐™ท ๐™ฟ๐™ธ๐™ฝ๐™ฝ๐™ด๐™ณ ๐™ผ๐™ด๐š‚๐š‚๐™ฐ๐™ถ๐™ด ๐™ฒ๐™ท๐™ด๐™ฒ๐™บ ๐™บ๐™ฐ๐š๐™พ","๐Ÿ‘‰ ๐Ÿ…ฑ๐Ÿ…ฐ๐Ÿ…ฒ๐Ÿ…บ๐Ÿ†„๐Ÿ…ฟ ๐Ÿ…ฒ๐Ÿ…ท๐Ÿ…ฐ๐Ÿ…ฝ๐Ÿ…ฝ๐Ÿ…ด๐Ÿ…ป","=" ,"โ—โ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ•พโƒโƒโ•ผโ—" ,"๐Ÿ”ฅBackup file๐Ÿ”ฅ" ,"๐Ÿ”ฅJoin channel ๐Ÿ”ฅ" ,"JOIN CHANNEL ๐Ÿ‘‡" ,"Join adult network๐ŸŒ๐Ÿ’ฆ" ,"SHARE OUR CHANNEL๐Ÿ‘‡" ,"๐—ง๐—ฒ๐—น๐—ฒ๐—ด๐—ฟ๐—ฎ๐—บ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น" ,"๐‰๐Ž๐ˆ๐ ๐”๐’ โžช" ,"๐Ÿ™†โ€โ™€ Join Our Backup:- ","Join now best channel" ,"โ™จ๏ธ SEARCH & JOIN NOW๐Ÿ‘‡","โ˜†โ˜†โ˜†โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ˜†โ˜†โ˜†","โžฅ"] - -##### ios new - -# iosNewS = [-1001320268729,-1001269643652,-1001592280578,-1001725626602,-1001736624413] -iosNewD = -1001146630538 - -#eng variables -indchats = [-1001679399038,-1001599913233,-1001794604239,-1001316413287,-1001665192861,-1001626636022,-1001168213397,-1001708628164,-1001562499878,-1001493682832] -indsend_to1 = -1001607066545 - - -#webseries var -webchat = [-1001615368632,-1001593607523,-1001028498885,-1001708829219,-1001421452039,-1001725626602,-1001115164915,-1001663893158] -websend_to = -1001621269851 - -#desi vars -deschat = [-1001711248489,-1001541608805,-1001767045981,-1001303095255,-1001314689320,-1001387860550,-1001250363281,-1001314689320,-1001138671226,-1001461291601] -dessend_to = -1001754232236 - -#tango vars -tanchat = [-1001330259957,-1001785029855,-1001745646849,-1001577675291,-1001568191558,-1001589153647] -tansend_to = -1001591226590 - - -#onlyfans vars -onchat = [-1001608452561,-1001199943325,-1001491824023] -onsend_to = -1001654275627 - - -sf1 = [-1001675910285] -df1 = -1001565160237 - -sfoot = "https://t.me/Watch_Streaam_Links/9\nโž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž– \n๐Ÿ”ž For More Hot Content @X3Links" - -############### ENGLISH 1 ########## - -@client.on(events.NewMessage(chats=indchats)) -async def hello1(event): - - # chat = await event.get_chat() - caption = event.message.message - urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) - if(urls_to_change): - try: - media = await client.download_media(event.message) - except: - media = False - print("no media") - # this is for blacklist word - - caption = re.sub("hehe" , "" , caption) - - caption = re.sub("hoho" , "" , caption) - caption = re.sub("๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡" , "" , caption) - caption = re.sub("https://www.instagram.com/haq.sebakchodi/" , "" , caption) - caption = re.sub("https://t.me/open_streaam/14" , "https://t.me/Watch_Streaam_Links/9" , caption) - - - - caption = re.sub("@.*" , "@X3Links" , caption) - caption = re.sub("https://t.me/.*" , "@X3Links" , caption) - caption = re.sub("t.me/.*" , "@X3Links" , caption) - caption = re.sub("T.me/.*" , "@X3Links" , caption) - for i in black: - caption = re.sub(i, "" , caption) - - regrex_pattern = re.compile(pattern = "[" - u"\U0001F600-\U0001F64F" # emoticons - u"\U0001F300-\U0001F5FF" # symbols & pictographs - u"\U0001F680-\U0001F6FF" # transport & map symbols - u"\U0001F1E0-\U0001F1FF" # flags (iOS) - "]+", flags = re.UNICODE) - - # url to change - for i in urls_to_change: - link = regrex_pattern.sub(r'' , i) - #print(link) - url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' - param = { - 'token': mdisk_api, - 'link':link.strip() - } - try: - res = requests.post(url, json = param) - except: - print("error in res") - return - try: - shareLink = res.json()['sharelink'] - except: - print("error in share") - shareLink = "" - # print("changed link : " , shareLink) - caption = re.sub(link , shareLink , caption) - # print(caption) - sleep(0.2) - caption = caption + "\n" - if media: - await client.send_file(indsend_to1,file=media , caption=caption) - os.remove(media) - else: - await client.send_message(indsend_to1, caption) - - - - ############### IOS ########## - -@client.on(events.NewMessage(chats=deschat)) -async def hello2(event): - # chat = await event.get_chat() - caption = event.message.message - urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) - if(urls_to_change): - try: - media = await client.download_media(event.message) - except: - media = False - print("no media") - # this is for blacklist word - - caption = re.sub("hehe" , "" , caption) - - caption = re.sub("hoho" , "" , caption) - caption = re.sub("๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡" , "" , caption) - caption = re.sub("https://www.instagram.com/haq.sebakchodi/" , "" , caption) - caption = re.sub("https://t.me/open_streaam/14" , "" , caption) - - - - caption = re.sub("@.*" , "@X3Links" , caption) - caption = re.sub("https://t.me/.*" , "@X3Links" , caption) - caption = re.sub("t.me/.*" , "@X3Links" , caption) - caption = re.sub("T.me/.*" , "@X3Links" , caption) - for i in black: - caption = re.sub(i, "" , caption) - - regrex_pattern = re.compile(pattern = "[" - u"\U0001F600-\U0001F64F" # emoticons - u"\U0001F300-\U0001F5FF" # symbols & pictographs - u"\U0001F680-\U0001F6FF" # transport & map symbols - u"\U0001F1E0-\U0001F1FF" # flags (iOS) - "]+", flags = re.UNICODE) - - # url to change - for i in urls_to_change: - link = regrex_pattern.sub(r'' , i) - #print(link) - url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' - param = { - 'token': mdisk_api, - 'link':link.strip() - } - try: - res = requests.post(url, json = param) - except: - print("error in res") - return - try: - shareLink = res.json()['sharelink'] - except: - print("error in share") - shareLink = "" - # print("changed link : " , shareLink) - caption = re.sub(link , shareLink , caption) - # print(caption) - sleep(0.2) - caption = caption + "\n" - if media: - await client.send_file(iosNewD,file=media , caption=caption) - os.remove(media) - else: - await client.send_message(iosNewD, caption) - - - - ##################### WEBSERIES ############# - -@client.on(events.NewMessage(chats=webchat)) -async def hello3(event): - # chat = await event.get_chat() - caption = event.message.message - # link syntax = https://streaam.net/S/$UydxddrFxb - urls_to_change = re.findall('https?://streaam.net/S/.*' , caption) - # print(urls_to_change) - if(urls_to_change): - try: - media = await client.download_media(event.message) - except: - media = False - print("no media") - # this is for blacklist word - - caption = re.sub("hehe" , "" , caption) - caption = re.sub("hoho" , "" , caption) - caption = re.sub("๐—™๐—ผ๐—น๐—น๐—ผ๐˜„ ๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜€๐˜๐—ฎ ๐—ฝ๐—ฎ๐—ด๐—ฒ๐Ÿ‘‡" , "" , caption) - caption = re.sub("https://www.instagram.com/haq.sebakchodi/" , "" , caption) - - caption = re.sub("@.*" , "" , caption) - caption = re.sub("https://t.me/.*" , "" , caption) - caption = re.sub("t.me/.*" , "" , caption) - caption = re.sub("T.me/.*" , "" , caption) - for i in black: - caption = re.sub(i, "" , caption) - - regrex_pattern = re.compile(pattern = "[" - u"\U0001F600-\U0001F64F" # emoticons - u"\U0001F300-\U0001F5FF" # symbols & pictographs - u"\U0001F680-\U0001F6FF" # transport & map symbols - u"\U0001F1E0-\U0001F1FF" # flags (iOS) - "]+", flags = re.UNICODE) - - # url to change - for i in urls_to_change: - link = regrex_pattern.sub(r'' , i) - linkid = link.split("/")[-1] - # print(linkid) - key = sapi - url = f'https://api.streaam.net/save?linkid={linkid}&key={key}' - # print(url) - # param = { - # 'token': mdisk_api, - # 'link':link.strip() - # } - try: - res = requests.get(url) - except: - print("error in res") - return - try: - shareLink = res.json()['link'] - except: - print("error in share") - shareLink = "" - print("changed link : " , shareLink) - caption = re.sub(re.escape(i) , shareLink , caption) - # print(caption) - # sleep(0.2) - caption = caption +sfoot - if media: - await client.send_file(websend_to ,file=media , caption=caption) - os.remove(media) - else: - await client.send_message(websend_to , caption) - - - -############ TANGO ############### - -@client.on(events.NewMessage(chats=tanchat)) -async def hello5(event): - # chat = await event.get_chat() - caption = event.message.message - urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) - if(urls_to_change): - try: - media = await client.download_media(event.message) - except: - media = False - print("no media") - # this is for blacklist word - caption = re.sub("hehe" , "" , caption) - caption = re.sub("hoho" , "" , caption) - - - caption = re.sub("@.*" , "@X3Links" , caption) - caption = re.sub("https://t.me/.*" , "@X3Links" , caption) - caption = re.sub("t.me/.*" , "@X3Links" , caption) - caption = re.sub("T.me/.*" , "@X3Links" , caption) - for i in black: - caption = re.sub(i, "" , caption) - - regrex_pattern = re.compile(pattern = "[" - u"\U0001F600-\U0001F64F" # emoticons - u"\U0001F300-\U0001F5FF" # symbols & pictographs - u"\U0001F680-\U0001F6FF" # transport & map symbols - u"\U0001F1E0-\U0001F1FF" # flags (iOS) - "]+", flags = re.UNICODE) - - # url to change - for i in urls_to_change: - link = regrex_pattern.sub(r'' , i) - #print(link) - url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' - param = { - 'token': mdisk_api, - 'link':link.strip() - } - try: - res = requests.post(url, json = param) - except: - print("error in res") - return - try: - shareLink = res.json()['sharelink'] - except: - print("error in share") - shareLink = "" - # print("changed link : " , shareLink) - caption = re.sub(link , shareLink , caption) - # print(caption) - sleep(0.2) - caption = caption + "\n" + footer - if media: - await client.send_file(tansend_to ,file=media , caption=caption) - os.remove(media) - else: - await client.send_message(tansend_to , caption) - - - - - -############ Desi ############### - -@client.on(events.NewMessage(chats=deschat)) -async def hello55(event): - # chat = await event.get_chat() - caption = event.message.message - urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) - if(urls_to_change): - try: - media = await client.download_media(event.message) - except: - media = False - print("no media") - # this is for blacklist word - caption = re.sub("hehe" , "" , caption) - caption = re.sub("hoho" , "" , caption) - - - caption = re.sub("@.*" , "@X3Links" , caption) - caption = re.sub("https://t.me/.*" , "@X3Links" , caption) - caption = re.sub("t.me/.*" , "@X3Links" , caption) - caption = re.sub("T.me/.*" , "@X3Links" , caption) - for i in black: - caption = re.sub(i, "" , caption) - - regrex_pattern = re.compile(pattern = "[" - u"\U0001F600-\U0001F64F" # emoticons - u"\U0001F300-\U0001F5FF" # symbols & pictographs - u"\U0001F680-\U0001F6FF" # transport & map symbols - u"\U0001F1E0-\U0001F1FF" # flags (iOS) - "]+", flags = re.UNICODE) - - # url to change - for i in urls_to_change: - link = regrex_pattern.sub(r'' , i) - #print(link) - url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' - param = { - 'token': mdisk_api, - 'link':link.strip() - } - try: - res = requests.post(url, json = param) - except: - print("error in res") - return - try: - shareLink = res.json()['sharelink'] - except: - print("error in share") - shareLink = "" - # print("changed link : " , shareLink) - caption = re.sub(link , shareLink , caption) - # print(caption) - sleep(0.2) - caption = caption + "\n" + footer - if media: - await client.send_file(deschat_to ,file=media , caption=caption) - os.remove(media) - else: - await client.send_message(deschat_to , caption) - -########### ONLYFANS ##################### -@client.on(events.NewMessage(chats=onchat)) -async def hello6(event): - # chat = await event.get_chat() - caption = event.message.message - urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) - if(urls_to_change): - try: - media = await client.download_media(event.message) - except: - media = False - print("no media") - # this is for blacklist word - caption = re.sub("hehe" , "" , caption) - caption = re.sub("hoho" , "" , caption) - - - caption = re.sub("@.*" , "@X3Links" , caption) - caption = re.sub("https://t.me/.*" , "@X3Links" , caption) - caption = re.sub("t.me/.*" , "@X3Links" , caption) - caption = re.sub("T.me/.*" , "@X3Links" , caption) - for i in black: - caption = re.sub(i, "" , caption) - - regrex_pattern = re.compile(pattern = "[" - u"\U0001F600-\U0001F64F" # emoticons - u"\U0001F300-\U0001F5FF" # symbols & pictographs - u"\U0001F680-\U0001F6FF" # transport & map symbols - u"\U0001F1E0-\U0001F1FF" # flags (iOS) - "]+", flags = re.UNICODE) - - # url to change - for i in urls_to_change: - link = regrex_pattern.sub(r'' , i) - #print(link) - url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' - param = { - 'token': mdisk_api, - 'link':link.strip() - } - try: - res = requests.post(url, json = param) - except: - print("error in res") - return - try: - shareLink = res.json()['sharelink'] - except: - print("error in share") - shareLink = "" - # print("changed link : " , shareLink) - caption = re.sub(link , shareLink , caption) - # print(caption) - sleep(0.2) - caption = caption + "\n" + footer - if media: - await client.send_file(onsend_to ,file=media , caption=caption) - os.remove(media) - else: - await client.send_message(onsend_to , caption) - - - -########################convert it -@client.on(events.NewMessage(chats=sf1)) -async def hello7(event): - # chat = await event.get_chat() - caption = event.message.message - urls_to_change = re.findall('https?://mdisk.me/convertor/.*' , caption) - if(urls_to_change): - try: - media = await client.download_media(event.message) - except: - media = False - print("no media") - # this is for blacklist word - caption = re.sub("hehe" , "" , caption) - caption = re.sub("hoho" , "" , caption) - - - caption = re.sub("@.*" , "" , caption) - caption = re.sub("https://t.me/.*" , "" , caption) - caption = re.sub("t.me/.*" , "" , caption) - caption = re.sub("T.me/.*" , "" , caption) - for i in black: - caption = re.sub(i, "" , caption) - - regrex_pattern = re.compile(pattern = "[" - u"\U0001F600-\U0001F64F" # emoticons - u"\U0001F300-\U0001F5FF" # symbols & pictographs - u"\U0001F680-\U0001F6FF" # transport & map symbols - u"\U0001F1E0-\U0001F1FF" # flags (iOS) - "]+", flags = re.UNICODE) +import time +from urllib.parse import urlparse +import aiohttp +from pyrogram import Client, filters +from bs4 import BeautifulSoup +import requests +import re - # url to change - for i in urls_to_change: - link = regrex_pattern.sub(r'' , i) - #print(link) - url = 'https://diskuploader.mypowerdisk.com/v1/tp/cp' - param = { - 'token': 'C2IGtPmGWkVoKaa0aPoy', - 'link':link.strip() - } - try: - res = requests.post(url, json = param) - except: - print("error in res") - return - try: - shareLink = res.json()['sharelink'] - except: - print("error in share") - shareLink = "" - # print("changed link : " , shareLink) - caption = re.sub(link , shareLink , caption) - # print(caption) - sleep(0.2) - caption = caption + "\n" - if media: - await client.send_file(df1 ,file=media , caption=caption) - os.remove(media) +API_ID = environ.get('API_ID') +API_HASH = environ.get('API_HASH') +BOT_TOKEN = environ.get('BOT_TOKEN') +PDISK_API_KEY = environ.get('PDISK_API_KEY') +THUMB_URL = environ.get('THUMB_URL', 'https://telegra.ph/file/7fe26cab6dd5057cf01d5.jpg') +CHANNEL = environ.get('CHANNEL') +bot = Client('pdisk bot', + api_id=API_ID, + api_hash=API_HASH, + bot_token=BOT_TOKEN, + workers=50, + sleep_threshold=0) + + +@bot.on_message(filters.command('start') & filters.private) +async def start(bot, message): + await message.reply( + f"**๐‡๐ž๐ฅ๐ฅ๐จ! ๐Ÿ‘จโ€๐Ÿ’ป{message.chat.first_name}!**\n\n" + "๐ˆ'๐ฆ ๐š M๐๐ข๐ฌ๐ค ๐”๐ฉ๐ฅ๐จ๐š๐๐ž๐ซ ๐›๐จ๐ญ. ๐‰๐ฎ๐ฌ๐ญ ๐ฌ๐ž๐ง๐ ๐ฆ๐ž ๐ฅ๐ข๐ง๐ค ๐จ๐ซ ๐…๐ฎ๐ฅ๐ฅ ๐ฉ๐จ๐ฌ๐ญ... \n ๐“๐ก๐ข๐ฌ ๐›๐จ๐ญ ๐ข๐ฌ ๐ฆ๐š๐๐ž ๐›๐ฒ [Mr Punisher](https://t.me/mrpunisher52)") + + +@bot.on_message(filters.text & filters.private) +async def pdisk_uploader(bot, message): + new_string = str(message.text) + try: + pdisk_link = await multi_pdisk_up(new_string) + await message.reply(f'{pdisk_link}', quote=True) + except Exception as e: + await message.reply(f'Error: {e}', quote=True) + + +@bot.on_message(filters.photo & filters.private) +async def pdisk_uploader(bot, message): + new_string = str(message.caption) + try: + pdisk_link = await multi_pdisk_up(new_string) + if(len(pdisk_link) > 1020): + await message.reply(f'{pdisk_link}', quote=True) else: - await client.send_message(df1 , caption) - - -print("Bot has been deployed.!") - -client.start() -client.run_until_disconnected() + await bot.send_photo(message.chat.id, message.photo.file_id, caption=f'{pdisk_link}') + except Exception as e: + await message.reply(f'Error: {e}', quote=True) + + +async def get_ptitle(url): + html_text = requests.get(url).text + soup = BeautifulSoup(html_text, 'html.parser') + for title in soup.find_all('title'): + pass + title = list(title.get_text()) + title = title[8:] + str = '@' + CHANNEL + ' ' + for i in title: + str = str + i + lst = list(html_text.split(",")) + c = 0 + for i in lst: + if ("""videoid""" in i): + found = lst[c] + break + c += 1 + + # pdisk.net link + pdisk_video_id = list(found.split(":")) + video_id = pdisk_video_id[2] + video_id = list(video_id.split(",")) + v_id = video_id[0] + v_len = len(v_id) + v_id = v_id[1:v_len - 2] + + v_url = 'https://www.pdisks.com/share-video?videoid=' + v_id + res = [str, v_url] + return res + + +async def pdisk_up(link): + if ('pdisk' in link or 'kuklink' in link or 'kofilink' in link or 'cofilink' in link or 'bit' in link or link in 'vdshort' or link in 'vidrivers' or link in 'dplinks' or link in 'droppx'): + res = await get_ptitle(link) + title_pdisk = res[0] + link = res[1] + else: + title_new = urlparse(link) + title_new = os.path.basename(title_new.path) + title_pdisk = '@' + CHANNEL + title_new + res = requests.get( + 'http://linkapi.net/open/create_item?link_type=link&content_src=' + link + '&source=2000&cover_url='+THUMB_URL+'&api_key=' + PDISK_API_KEY + '&dir_id=0&title=' + title_pdisk + '&description=Join_' + CHANNEL + '_for_more_like_this') + data = res.json() + data = dict(data) + print(data) + v_id = data['data']['item_id'] + v_url = 'https://www.pdisk.me/share-video?videoid=' + v_id + return (v_url) + + +async def multi_pdisk_up(ml_string): + new_ml_string = list(map(str, ml_string.split(" "))) + new_ml_string = await remove_username(new_ml_string) + new_join_str = "".join(new_ml_string) + + urls = re.findall(r'(https?://[^\s]+)', new_join_str) + + nml_len = len(new_ml_string) + u_len = len(urls) + url_index = [] + count = 0 + for i in range(nml_len): + for j in range(u_len): + if (urls[j] in new_ml_string[i]): + url_index.append(count) + count += 1 + new_urls = await new_pdisk_url(urls) + url_index = list(dict.fromkeys(url_index)) + i = 0 + for j in url_index: + new_ml_string[j] = new_ml_string[j].replace(urls[i], new_urls[i]) + i += 1 + + new_string = " ".join(new_ml_string) + return await addFooter(new_string) + + +async def new_pdisk_url(urls): + new_urls = [] + for i in urls: + time.sleep(0.2) + new_urls.append(await pdisk_up(i)) + return new_urls + + +async def remove_username(new_List): + for i in new_List: + if('@' in i or 't.me' in i or 'https://bit.ly/3m4gabB' in i or 'https://bit.ly/pdisk_tuts' in i or 'telegra.ph' in i): + new_List.remove(i) + return new_List + + +async def addFooter(str): + footer = """ +โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ + Droplink tutorial - https://t.me/hornyworld22/13 +โ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌโ–ฌ + +โญ๏ธJOIN CHANNEL โžก๏ธ t.me/""" + CHANNEL + return str + footer + +bot.run()