diff --git a/.gitignore b/.gitignore index 71bfc16b..0f626aef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__ my_bot.session my_bot.session-journal +.venv/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f563af32..d0574ebf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,30 @@ FROM python:3.9 +# Set working directory WORKDIR /app +# Install system dependencies +RUN apt-get update && apt-get install -y \ + gcc \ + g++ \ + && rm -rf /var/lib/apt/lists/* + +# Copy requirements and install Python dependencies COPY requirements.txt /app/ -RUN pip3 install -r requirements.txt -COPY . /app +RUN pip3 install --no-cache-dir -r requirements.txt + +# Copy application code +COPY . /app/ + +# Set Python path to include src directory +ENV PYTHONPATH="/app/src:${PYTHONPATH}" + +# Expose port +EXPOSE 5000 + +# Health check +HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ + CMD curl -f http://localhost:5000/health || exit 1 -CMD gunicorn app:app & python3 main.py \ No newline at end of file +# Run the application +CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "4", "--timeout", "120", "src.app:app"] \ No newline at end of file diff --git a/Procfile b/Procfile deleted file mode 100644 index 20f0c180..00000000 --- a/Procfile +++ /dev/null @@ -1,2 +0,0 @@ -worker: python3 main.py -web: python3 app.py \ No newline at end of file diff --git a/README.md b/README.md index 84d3ca93..b81b2c8a 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,313 @@ -# Link-Bypasser-Bot +# 🚀 Link Bypasser Bot -a Telegram Bot (with Site) that can Bypass Ad Links, Generate Direct Links and Jump Paywalls. see the Bot at -~~[@BypassLinkBot](https://t.me/BypassLinkBot)~~ [@BypassUrlsBot](https://t.me/BypassUrlsBot) or try it on [Replit](https://replit.com/@bipinkrish/Link-Bypasser#app.py) +[![Python](https://img.shields.io/badge/Python-3.11+-blue.svg)](https://www.python.org) +[![Flask](https://img.shields.io/badge/Flask-Web%20App-green.svg)](https://flask.palletsprojects.com) +[![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com) +[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) ---- +A powerful Telegram Bot and Web Application that bypasses ad links, generates direct download links, and jumps paywalls for **100+ websites**. Features a modern, modular architecture with dynamic site support and a premium dark web interface. + +## 🌟 Features + +- **100+ Supported Sites**: Automatically bypass links from major file hosting and streaming platforms +- **Telegram Integration**: Full-featured bot with real-time processing +- **Web Interface**: Premium dark minimalist design with responsive layout +- **Modular Architecture**: Easy to extend with new site support +- **Smart Caching**: Public database integration for faster responses +- **Auto-Discovery**: Dynamic site loading system +- **Docker Ready**: Production deployment with health checks +- **Mobile Responsive**: Works seamlessly on all devices -## Special Feature - Public Database +## 🎯 Live Demo -Results of the bypass is hosted on public database on [DBHub.io](https://dbhub.io/bipinkrish/link_bypass.db) so if the bot finds link alredy in database it uses the result from the same, time saved and so many problems will be solved. +- **Telegram Bot**: [@BypassUrlsBot](https://t.me/BypassUrlsBot) +- **Web App**: Try the interface with instant link processing -Table is creted with the below command, if anyone wants to use it for thier own. +## 🏗️ Architecture -```sql -CREATE TABLE results (link TEXT PRIMARY KEY, result TEXT) +``` +src/ +├── app.py # Flask web application +├── config.py # Dynamic site discovery system +├── core/ +│ ├── texts.py # Dynamic text generation +│ └── db.py # Database operations +└── sites/ # Site modules (100+ sites) + ├── bypasser.py # Link bypass sites + ├── ddl.py # Direct download sites + └── freewall.py # Paywall bypass sites ``` ---- +## 🚀 Quick Start -## Required Variables +### Option 1: Docker (Recommended) -- `TOKEN` Bot Token from @BotFather -- `HASH` API Hash from my.telegram.org -- `ID` API ID from my.telegram.org +```bash +# Clone the repository +git clone https://github.com/bipinkrish/Link-Bypasser-Bot.git +cd Link-Bypasser-Bot -## Optional Variables -you can also set these in `config.json` file +# Build and run with Docker +docker build -t link-bypasser . +docker run -p 5000:5000 link-bypasser +``` -- `CRYPT` GDTot Crypt If you don't know how to get Crypt then [Learn Here](https://www.youtube.com/watch?v=EfZ29CotRSU) -- `XSRF_TOKEN` and `Laravel_Session` XSRF Token and Laravel Session cookies! If you don't know how to get then then watch [this Video](https://www.youtube.com/watch?v=EfZ29CotRSU) (for GDTOT) and do the same for sharer.pw -- `DRIVEFIRE_CRYPT` Drivefire Crypt -- `KOLOP_CRYPT` Kolop Crypt! -- `HUBDRIVE_CRYPT` Hubdrive Crypt -- `KATDRIVE_CRYPT` Katdrive Crypt -- `UPTOBOX_TOKEN` Uptobox Token -- `TERA_COOKIE` Terabox Cookie (only `ndus` value) (see [Help](#help)) -- `CLOUDFLARE` Use `cf_clearance` cookie from and Cloudflare protected sites -- `PORT` Port to run the Bot Site on (defaults to 5000) +### Option 2: Manual Setup -## Optinal Database Feature -You need set all three to work +```bash +# Clone and setup +git clone https://github.com/bipinkrish/Link-Bypasser-Bot.git +cd Link-Bypasser-Bot -- `DB_API` API KEY from [DBHub](https://dbhub.io/pref), make sure it has Read/Write permission -- `DB_OWNER` (defaults to `bipinkrish`) -- `DB_NAME` (defaults to `link_bypass.db`) +# Install dependencies +pip install -r requirements.txt ---- +# Configure environment (see Configuration section) +cp config.json.example config.json -## Deploy on Heroku +# Run the application +python src/app.py +``` -*BEFORE YOU DEPLOY ON HEROKU, YOU SHOULD FORK THE REPO AND CHANGE ITS NAME TO ANYTHING ELSE*
+### Option 3: Deploy to Heroku -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/bipinkrish/Link-Bypasser-Bot)
+_Note: Fork the repository and change its name before deployment_ ---- +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/bipinkrish/Link-Bypasser-Bot) + +## ⚙️ Configuration -## Commands +### Required Variables -Everything is set programtically, nothing to work +Set these environment variables or in `config.json`: +```json +{ + "TOKEN": "Your Bot Token from @BotFather", + "HASH": "API Hash from my.telegram.org", + "ID": "API ID from my.telegram.org" +} ``` -/start - Welcome Message -/help - List of All Supported Sites + +### Optional Variables + +```json +{ + "CRYPT": "GDTot Crypt token", + "XSRF_TOKEN": "XSRF Token for protected sites", + "Laravel_Session": "Laravel Session cookie", + "DRIVEFIRE_CRYPT": "Drivefire bypass token", + "KOLOP_CRYPT": "Kolop bypass token", + "HUBDRIVE_CRYPT": "Hubdrive bypass token", + "KATDRIVE_CRYPT": "Katdrive bypass token", + "UPTOBOX_TOKEN": "Uptobox premium token", + "TERA_COOKIE": "Terabox ndus cookie value", + "CLOUDFLARE": "cf_clearance cookie for Cloudflare sites", + "PORT": "5000" +} ``` ---- +### Database Configuration (Optional) -## Supported Sites +Enable public caching database: -To see the list of supported sites see [texts.py](https://github.com/bipinkrish/Link-Bypasser-Bot/blob/main/texts.py) file +```json +{ + "DB_API": "DBHub.io API key (Read/Write permission)", + "DB_OWNER": "bipinkrish", + "DB_NAME": "link_bypass.db" +} +``` ---- +## 🤖 Bot Commands + +- `/start` - Welcome message with feature overview +- `/help` - Complete list of supported sites by category + +## 🌐 Supported Sites + +The bot supports **100+ websites** across three main categories: + +### 🔗 Link Bypass Sites (40+) + +- LinkVertise, Shortlinks, AdFly, GPLinks, and more +- Automatically detected via URL patterns + +### 📁 Direct Download Sites (50+) + +- Google Drive, Mega, MediaFire, Terabox, and more +- Generates direct download links + +### 🔓 Paywall Bypass Sites (15+) + +- Medium, Telegraph, Scribd, and more +- Provides unrestricted access + +_For the complete list, run the bot's `/help` command or check the web interface_ + +## 🛠️ How to Contribute + +We welcome contributions! Here's how to extend site support: + +### Adding a New Site Module + +1. **Fork and Clone** + + ```bash + git fork https://github.com/bipinkrish/Link-Bypasser-Bot.git + git clone https://github.com/yourusername/Link-Bypasser-Bot.git + ``` + +2. **Choose the Right Module** + + - Add to `src/sites/bypasser.py` for ad/short links + - Add to `src/sites/ddl.py` for direct downloads + - Add to `src/sites/freewall.py` for paywall bypass + +3. **Implement Required Components** + + Each site needs these components in the module: + + ```python + # Site metadata + SITE_NAME = "YourSite" + + # URL patterns for auto-detection + URL_PATTERNS = [ + r'https?://yoursite\.com/.*', + r'https?://.*\.yoursite\.com/.*' + ] + + # Main processing function + def process_url(url): + """ + Process the URL and return result + + Args: + url (str): The URL to process -## Help + Returns: + str: The processed result (direct link, bypassed URL, etc.) -* If you are deploying on VPS, watch videos on how to set/export Environment Variables. OR you can set these in `config.json` file -* Terabox Cookie + Raises: + Exception: On processing errors + """ + # Your implementation here + return processed_url + ``` + +4. **Example Implementation** + + ```python + import requests + from bs4 import BeautifulSoup + + SITE_NAME = "ExampleSite" + URL_PATTERNS = [r'https?://example\.com/.*'] + + def process_url(url): + try: + response = requests.get(url) + soup = BeautifulSoup(response.text, 'html.parser') + + # Extract the direct link + direct_link = soup.find('a', {'id': 'download'})['href'] + + return direct_link + except Exception as e: + raise Exception(f"Failed to process {url}: {str(e)}") + ``` + +5. **Test Your Implementation** + + ```bash + # Test locally + python src/app.py + + # Test with your URLs in the web interface + ``` + +6. **Submit a Pull Request** + - Ensure your code follows the existing patterns + - Test with multiple URLs from the site + - Include a brief description of the site and implementation + +### Advanced Contribution Guidelines + +- **Error Handling**: Always wrap requests in try-except blocks +- **User Agents**: Use realistic browser user agents for requests +- **Rate Limiting**: Implement delays for sites that require them +- **Dependencies**: Minimize external dependencies, use standard libraries when possible +- **Documentation**: Comment complex logic and unusual patterns +- **Testing**: Test edge cases like expired links, private files, etc. + +### Development Setup + +```bash +# Setup development environment +python -m venv venv +source venv/bin/activate # On Windows: venv\Scripts\activate +pip install -r requirements.txt + +# Install development dependencies +pip install pytest black flake8 + +# Run tests +pytest tests/ + +# Format code +black src/ +``` + +## 📚 API Documentation + +### Auto-Discovery System + +The application automatically discovers and loads site modules using: + +```python +from src.config import get_all_site_names, get_function_by_url + +# Get all supported sites +sites = get_all_site_names() + +# Process URL automatically +result = get_function_by_url(url) +``` + +### Web API Endpoints + +- `GET /` - Main interface with site listings +- `POST /bypass` - Process URLs via API +- `GET /health` - Health check endpoint + +## 🔧 Troubleshooting + +### Common Issues + +1. **Import Errors**: Ensure you're running from project root +2. **Site Not Working**: Check if cookies/tokens are required +3. **Docker Issues**: Verify port mapping and environment variables +4. **Database Errors**: Check DBHub.io API key permissions + +### Getting Help + +- Create an issue for bugs or feature requests +- Check existing issues for solutions +- Join our community discussions + +## 📄 License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## 🙏 Acknowledgments + +- All contributors who help expand site support +- The open-source community for tools and libraries +- Users who test and report issues + +--- - 1. Open any Browser - 2. Make sure you are logged in with a Terbox account - 3. Press `f12` to open DEV tools and click Network tab - 4. Open any Terbox video link and open Cookies tab - 5. Copy value of `ndus` - -
+⭐ **Star this repository** if you find it useful! - ![](https://i.ibb.co/hHBZM5m/Screenshot-113.png) +[![GitHub stars](https://img.shields.io/github/stars/bipinkrish/Link-Bypasser-Bot?style=social)](https://github.com/bipinkrish/Link-Bypasser-Bot/stargazers) diff --git a/app.json b/app.json deleted file mode 100644 index a858a011..00000000 --- a/app.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "Link-Bypasser-Bot", - "description": "A Telegram Bot (with Site) that can Bypass Ad Links, Generate Direct Links and Jump Paywalls", - "keywords": [ - "telegram", - "Link bypass", - "bypass bot", - "telegram bot" - ], - "repository": "https://github.com/bipinkrish/Link-Bypasser-Bot", - "logo": "https://ibb.co/kMVxrCj", - "env": { - "HASH": { - "description": "Your API HASH from my.telegram.org", - "required": true - }, - "ID": { - "description": "Your API ID from my.telegram.org", - "required": true - }, - "TOKEN":{ - "description": "Your bot token from @BotFather", - "required": true - }, - "TERA_COOKIE": { - "description": "Terabox Cookie (only ndus value)", - "required": false - }, - "CRYPT": { - "description": "GDTot Crypt", - "required": false - }, - "XSRF_TOKEN": { - "description": "XSRF Token cookies! Check readme file in repo", - "required": false - }, - "Laravel_Session": { - "description": "Laravel Session cookies! Check readme file in repo", - "required": false - }, - "DRIVEFIRE_CRYPT": { - "description": "Drivefire Crypt", - "required": false - }, - "KOLOP_CRYPT": { - "description": "Kolop Crypt", - "required": false - }, - "HUBDRIVE_CRYPT": { - "description": "Hubdrive Crypt", - "required": false - }, - "KATDRIVE_CRYPT": { - "description": "Katdrive Crypt", - "required": false - }, - "UPTOBOX_TOKEN": { - "description": "Uptobox Token", - "required": false - }, - "CLOUDFLARE": { - "description": "Use cf_clearance cookie from and Cloudflare protected sites", - "required": false - }, - "PORT": { - "description": "Port to run the Bot Site on (default is 5000)", - "required": false - } - }, - "buildpacks": [ - { - "url": "heroku/python" - } - ], - "formation": { - "web": { - "quantity": 1, - "size": "standard-1x" - } - } -} diff --git a/app.py b/app.py deleted file mode 100644 index b98e6b18..00000000 --- a/app.py +++ /dev/null @@ -1,94 +0,0 @@ -from flask import Flask, request, render_template, make_response, send_file -import bypasser -import re -import os -import freewall - - -app = Flask(__name__) - - -def handle_index(ele): - return bypasser.scrapeIndex(ele) - - -def store_shortened_links(link): - with open("shortened_links.txt", "a") as file: - file.write(link + "\n") - - -def loop_thread(url): - urls = [] - urls.append(url) - - if not url: - return None - - link = "" - temp = None - for ele in urls: - if re.search(r"https?:\/\/(?:[\w.-]+)?\.\w+\/\d+:", ele): - handle_index(ele) - elif bypasser.ispresent(bypasser.ddl.ddllist, ele): - try: - temp = bypasser.ddl.direct_link_generator(ele) - except Exception as e: - temp = "**Error**: " + str(e) - elif freewall.pass_paywall(ele, check=True): - freefile = freewall.pass_paywall(ele) - if freefile: - try: - return send_file(freefile) - except: - pass - else: - try: - temp = bypasser.shortners(ele) - except Exception as e: - temp = "**Error**: " + str(e) - print("bypassed:", temp) - if temp: - link = link + temp + "\n\n" - - return link - - -@app.route("/", methods=["GET", "POST"]) -def index(): - if request.method == "POST": - url = request.form.get("url") - result = loop_thread(url) - if freewall.pass_paywall(url, check=True): - return result - - shortened_links = request.cookies.get("shortened_links") - if shortened_links: - prev_links = shortened_links.split(",") - else: - prev_links = [] - - if result: - prev_links.append(result) - - if len(prev_links) > 10: - prev_links = prev_links[-10:] - - shortened_links_str = ",".join(prev_links) - resp = make_response( - render_template("index.html", result=result, prev_links=prev_links) - ) - resp.set_cookie("shortened_links", shortened_links_str) - - return resp - - shortened_links = request.cookies.get("shortened_links") - return render_template( - "index.html", - result=None, - prev_links=shortened_links.split(",") if shortened_links else None, - ) - - -if __name__ == "__main__": - port = int(os.environ.get("PORT", 5000)) - app.run(host="0.0.0.0", port=port) diff --git a/bypasser.py b/bypasser.py deleted file mode 100644 index 92be8e37..00000000 --- a/bypasser.py +++ /dev/null @@ -1,2796 +0,0 @@ -import re -import requests -from curl_cffi import requests as Nreq -import base64 -from urllib.parse import unquote, urlparse, quote -import time -import cloudscraper -from bs4 import BeautifulSoup, NavigableString, Tag -from lxml import etree -import hashlib -import json -from asyncio import sleep as asleep -import ddl -from cfscrape import create_scraper -from json import load -from os import environ - -with open("config.json", "r") as f: - DATA = load(f) - - -def getenv(var): - return environ.get(var) or DATA.get(var, None) - - -########################################################## -# ENVs - -GDTot_Crypt = getenv("CRYPT") -Laravel_Session = getenv("Laravel_Session") -XSRF_TOKEN = getenv("XSRF_TOKEN") -DCRYPT = getenv("DRIVEFIRE_CRYPT") -KCRYPT = getenv("KOLOP_CRYPT") -HCRYPT = getenv("HUBDRIVE_CRYPT") -KATCRYPT = getenv("KATDRIVE_CRYPT") -CF = getenv("CLOUDFLARE") - -############################################################ -# Lists - -otherslist = [ - "exe.io", - "exey.io", - "sub2unlock.net", - "sub2unlock.com", - "rekonise.com", - "letsboost.net", - "ph.apps2app.com", - "mboost.me", - "sub4unlock.com", - "ytsubme.com", - "social-unlock.com", - "boost.ink", - "goo.gl", - "shrto.ml", - "t.co", -] - -gdlist = [ - "appdrive", - "driveapp", - "drivehub", - "gdflix", - "drivesharer", - "drivebit", - "drivelinks", - "driveace", - "drivepro", - "driveseed", -] - - -############################################################### -# pdisk - - -def pdisk(url): - r = requests.get(url).text - try: - return r.split("")[0] - except: - try: - return ( - BeautifulSoup(r, "html.parser").find("video").find("source").get("src") - ) - except: - return None - - -############################################################### -# index scrapper - - -def scrapeIndex(url, username="none", password="none"): - - def authorization_token(username, password): - user_pass = f"{username}:{password}" - return f"Basic {base64.b64encode(user_pass.encode()).decode()}" - - def decrypt(string): - return base64.b64decode(string[::-1][24:-20]).decode("utf-8") - - def func(payload_input, url, username, password): - next_page = False - next_page_token = "" - - url = f"{url}/" if url[-1] != "/" else url - - try: - headers = {"authorization": authorization_token(username, password)} - except: - return "username/password combination is wrong", None, None - - encrypted_response = requests.post(url, data=payload_input, headers=headers) - if encrypted_response.status_code == 401: - return "username/password combination is wrong", None, None - - try: - decrypted_response = json.loads(decrypt(encrypted_response.text)) - except: - return ( - "something went wrong. check index link/username/password field again", - None, - None, - ) - - page_token = decrypted_response["nextPageToken"] - if page_token is None: - next_page = False - else: - next_page = True - next_page_token = page_token - - if list(decrypted_response.get("data").keys())[0] != "error": - file_length = len(decrypted_response["data"]["files"]) - result = "" - - for i, _ in enumerate(range(file_length)): - files_type = decrypted_response["data"]["files"][i]["mimeType"] - if files_type != "application/vnd.google-apps.folder": - files_name = decrypted_response["data"]["files"][i]["name"] - - direct_download_link = url + quote(files_name) - result += f"• {files_name} :\n{direct_download_link}\n\n" - return result, next_page, next_page_token - - def format(result): - long_string = "".join(result) - new_list = [] - - while len(long_string) > 0: - if len(long_string) > 4000: - split_index = long_string.rfind("\n\n", 0, 4000) - if split_index == -1: - split_index = 4000 - else: - split_index = len(long_string) - - new_list.append(long_string[:split_index]) - long_string = long_string[split_index:].lstrip("\n\n") - - return new_list - - # main - x = 0 - next_page = False - next_page_token = "" - result = [] - - payload = {"page_token": next_page_token, "page_index": x} - print(f"Index Link: {url}\n") - temp, next_page, next_page_token = func(payload, url, username, password) - if temp is not None: - result.append(temp) - - while next_page == True: - payload = {"page_token": next_page_token, "page_index": x} - temp, next_page, next_page_token = func(payload, url, username, password) - if temp is not None: - result.append(temp) - x += 1 - - if len(result) == 0: - return None - return format(result) - - -################################################################ -# Shortner Full Page API - - -def shortner_fpage_api(link): - link_pattern = r"https?://[\w.-]+/full\?api=([^&]+)&url=([^&]+)(?:&type=(\d+))?" - match = re.match(link_pattern, link) - if match: - try: - url_enc_value = match.group(2) - url_value = base64.b64decode(url_enc_value).decode("utf-8") - return url_value - except BaseException: - return None - else: - return None - - -# Shortner Quick Link API - - -def shortner_quick_api(link): - link_pattern = r"https?://[\w.-]+/st\?api=([^&]+)&url=([^&]+)" - match = re.match(link_pattern, link) - if match: - try: - url_value = match.group(2) - return url_value - except BaseException: - return None - else: - return None - - -############################################################## -# tnlink - - -def tnlink(url): - client = requests.session() - DOMAIN = "https://page.tnlink.in/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://usanewstoday.club/" - h = {"referer": ref} - while len(client.cookies) == 0: - resp = client.get(final_url, headers=h) - time.sleep(2) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -############################################################### -# psa - - -def try2link_bypass(url): - client = cloudscraper.create_scraper(allow_brotli=False) - - url = url[:-1] if url[-1] == "/" else url - - params = (("d", int(time.time()) + (60 * 4)),) - r = client.get(url, params=params, headers={"Referer": "https://newforex.online/"}) - - soup = BeautifulSoup(r.text, "html.parser") - inputs = soup.find(id="go-link").find_all(name="input") - data = {input.get("name"): input.get("value") for input in inputs} - time.sleep(7) - - headers = { - "Host": "try2link.com", - "X-Requested-With": "XMLHttpRequest", - "Origin": "https://try2link.com", - "Referer": url, - } - - bypassed_url = client.post( - "https://try2link.com/links/go", headers=headers, data=data - ) - return bypassed_url.json()["url"] - - -def try2link_scrape(url): - client = cloudscraper.create_scraper(allow_brotli=False) - h = { - "upgrade-insecure-requests": "1", - "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", - } - res = client.get(url, cookies={}, headers=h) - url = "https://try2link.com/" + re.findall("try2link\.com\/(.*?) ", res.text)[0] - return try2link_bypass(url) - - -def psa_bypasser(psa_url): - cookies = {"cf_clearance": CF} - headers = { - "authority": "psa.wf", - "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", - "accept-language": "en-US,en;q=0.9", - "referer": "https://psa.wf/", - "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36", - } - - r = requests.get(psa_url, headers=headers, cookies=cookies) - soup = BeautifulSoup(r.text, "html.parser").find_all( - class_="dropshadowboxes-drop-shadow dropshadowboxes-rounded-corners dropshadowboxes-inside-and-outside-shadow dropshadowboxes-lifted-both dropshadowboxes-effect-default" - ) - links = [] - for link in soup: - try: - exit_gate = link.a.get("href") - if "/exit" in exit_gate: - print("scraping :", exit_gate) - links.append(try2link_scrape(exit_gate)) - except: - pass - - finals = "" - for li in links: - try: - res = requests.get(li, headers=headers, cookies=cookies) - soup = BeautifulSoup(res.text, "html.parser") - name = soup.find("h1", class_="entry-title", itemprop="headline").getText() - finals += "**" + name + "**\n\n" - soup = soup.find("div", class_="entry-content", itemprop="text").findAll( - "a" - ) - for ele in soup: - finals += "○ " + ele.get("href") + "\n" - finals += "\n\n" - except: - finals += li + "\n\n" - return finals - - -################################################################################################################## -# rocklinks - - -def rocklinks(url): - client = cloudscraper.create_scraper(allow_brotli=False) - if "rocklinks.net" in url: - DOMAIN = "https://blog.disheye.com" - else: - DOMAIN = "https://rocklinks.net" - - url = url[:-1] if url[-1] == "/" else url - - code = url.split("/")[-1] - if "rocklinks.net" in url: - final_url = f"{DOMAIN}/{code}?quelle=" - else: - final_url = f"{DOMAIN}/{code}" - - resp = client.get(final_url) - soup = BeautifulSoup(resp.content, "html.parser") - - try: - inputs = soup.find(id="go-link").find_all(name="input") - except: - return "Incorrect Link" - - data = {input.get("name"): input.get("value") for input in inputs} - - h = {"x-requested-with": "XMLHttpRequest"} - - time.sleep(10) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -################################################ -# igg games - - -def decodeKey(encoded): - key = "" - - i = len(encoded) // 2 - 5 - while i >= 0: - key += encoded[i] - i = i - 2 - - i = len(encoded) // 2 + 4 - while i < len(encoded): - key += encoded[i] - i = i + 2 - - return key - - -def bypassBluemediafiles(url, torrent=False): - headers = { - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.5", - "Alt-Used": "bluemediafiles.com", - "Connection": "keep-alive", - "Upgrade-Insecure-Requests": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "none", - "Sec-Fetch-User": "?1", - } - - res = requests.get(url, headers=headers) - soup = BeautifulSoup(res.text, "html.parser") - script = str(soup.findAll("script")[3]) - encodedKey = script.split('Create_Button("')[1].split('");')[0] - - headers = { - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.5", - "Referer": url, - "Alt-Used": "bluemediafiles.com", - "Connection": "keep-alive", - "Upgrade-Insecure-Requests": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "same-origin", - "Sec-Fetch-User": "?1", - } - - params = {"url": decodeKey(encodedKey)} - - if torrent: - res = requests.get( - "https://dl.pcgamestorrents.org/get-url.php", params=params, headers=headers - ) - soup = BeautifulSoup(res.text, "html.parser") - furl = soup.find("a", class_="button").get("href") - - else: - res = requests.get( - "https://bluemediafiles.com/get-url.php", params=params, headers=headers - ) - furl = res.url - if "mega.nz" in furl: - furl = furl.replace("mega.nz/%23!", "mega.nz/file/").replace("!", "#") - - return furl - - -def igggames(url): - res = requests.get(url) - soup = BeautifulSoup(res.text, "html.parser") - soup = soup.find("div", class_="uk-margin-medium-top").findAll("a") - - bluelist = [] - for ele in soup: - bluelist.append(ele.get("href")) - bluelist = bluelist[3:-1] - - links = "" - last = None - fix = True - for ele in bluelist: - if ele == "https://igg-games.com/how-to-install-a-pc-game-and-update.html": - fix = False - links += "\n" - if "bluemediafile" in ele: - tmp = bypassBluemediafiles(ele) - if fix: - tt = tmp.split("/")[2] - if last is not None and tt != last: - links += "\n" - last = tt - links = links + "○ " + tmp + "\n" - elif "pcgamestorrents.com" in ele: - res = requests.get(ele) - soup = BeautifulSoup(res.text, "html.parser") - turl = ( - soup.find( - "p", class_="uk-card uk-card-body uk-card-default uk-card-hover" - ) - .find("a") - .get("href") - ) - links = links + "🧲 `" + bypassBluemediafiles(turl, True) + "`\n\n" - elif ele != "https://igg-games.com/how-to-install-a-pc-game-and-update.html": - if fix: - tt = ele.split("/")[2] - if last is not None and tt != last: - links += "\n" - last = tt - links = links + "○ " + ele + "\n" - - return links[:-1] - - -############################################################### -# htpmovies cinevood sharespark atishmkv - - -def htpmovies(link): - client = cloudscraper.create_scraper(allow_brotli=False) - r = client.get(link, allow_redirects=True).text - j = r.split('("')[-1] - url = j.split('")')[0] - param = url.split("/")[-1] - DOMAIN = "https://go.theforyou.in" - final_url = f"{DOMAIN}/{param}" - resp = client.get(final_url) - soup = BeautifulSoup(resp.content, "html.parser") - try: - inputs = soup.find(id="go-link").find_all(name="input") - except: - return "Incorrect Link" - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(10) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went Wrong !!" - - -def scrappers(link): - - try: - link = re.match( - r"((http|https)\:\/\/)?[a-zA-Z0-9\.\/\?\:@\-_=#]+\.([a-zA-Z]){2,6}([a-zA-Z0-9\.\&\/\?\:@\-_=#])*", - link, - )[0] - except TypeError: - return "Not a Valid Link." - links = [] - - if "sharespark" in link: - gd_txt = "" - res = requests.get("?action=printpage;".join(link.split("?"))) - soup = BeautifulSoup(res.text, "html.parser") - for br in soup.findAll("br"): - next_s = br.nextSibling - if not (next_s and isinstance(next_s, NavigableString)): - continue - next2_s = next_s.nextSibling - if next2_s and isinstance(next2_s, Tag) and next2_s.name == "br": - text = str(next_s).strip() - if text: - result = re.sub(r"(?m)^\(https://i.*", "", next_s) - star = re.sub(r"(?m)^\*.*", " ", result) - extra = re.sub(r"(?m)^\(https://e.*", " ", star) - gd_txt += ( - ", ".join( - re.findall( - r"(?m)^.*https://new1.gdtot.cfd/file/[0-9][^.]*", next_s - ) - ) - + "\n\n" - ) - return gd_txt - - elif "htpmovies" in link and "/exit.php" in link: - return htpmovies(link) - - elif "htpmovies" in link: - prsd = "" - links = [] - res = requests.get(link) - soup = BeautifulSoup(res.text, "html.parser") - x = soup.select('a[href^="/exit.php?url="]') - y = soup.select("h5") - z = ( - unquote(link.split("/")[-2]).split("-")[0] - if link.endswith("/") - else unquote(link.split("/")[-1]).split("-")[0] - ) - - for a in x: - links.append(a["href"]) - prsd = f"Total Links Found : {len(links)}\n\n" - - msdcnt = -1 - for b in y: - if str(b.string).lower().startswith(z.lower()): - msdcnt += 1 - url = f"https://htpmovies.lol" + links[msdcnt] - prsd += f"{msdcnt+1}. {b.string}\n{htpmovies(url)}\n\n" - asleep(5) - return prsd - - elif "cinevood" in link: - prsd = "" - links = [] - res = requests.get(link) - soup = BeautifulSoup(res.text, "html.parser") - x = soup.select('a[href^="https://kolop.icu/file"]') - for a in x: - links.append(a["href"]) - for o in links: - res = requests.get(o) - soup = BeautifulSoup(res.content, "html.parser") - title = soup.title.string - reftxt = re.sub(r"Kolop \| ", "", title) - prsd += f"{reftxt}\n{o}\n\n" - return prsd - - elif "atishmkv" in link: - prsd = "" - links = [] - res = requests.get(link) - soup = BeautifulSoup(res.text, "html.parser") - x = soup.select('a[href^="https://gdflix.top/file"]') - for a in x: - links.append(a["href"]) - for o in links: - prsd += o + "\n\n" - return prsd - - elif "teluguflix" in link: - gd_txt = "" - r = requests.get(link) - soup = BeautifulSoup(r.text, "html.parser") - links = soup.select('a[href*="gdtot"]') - gd_txt = f"Total Links Found : {len(links)}\n\n" - for no, link in enumerate(links, start=1): - gdlk = link["href"] - t = requests.get(gdlk) - soupt = BeautifulSoup(t.text, "html.parser") - title = soupt.select('meta[property^="og:description"]') - gd_txt += f"{no}. {(title[0]['content']).replace('Download ' , '')}\n{gdlk}\n\n" - asleep(1.5) - return gd_txt - - elif "taemovies" in link: - gd_txt, no = "", 0 - r = requests.get(link) - soup = BeautifulSoup(r.text, "html.parser") - links = soup.select('a[href*="shortingly"]') - gd_txt = f"Total Links Found : {len(links)}\n\n" - for a in links: - glink = rocklinks(a["href"]) - t = requests.get(glink) - soupt = BeautifulSoup(t.text, "html.parser") - title = soupt.select('meta[property^="og:description"]') - no += 1 - gd_txt += ( - f"{no}. {(title[0]['content']).replace('Download ' , '')}\n{glink}\n\n" - ) - return gd_txt - - elif "toonworld4all" in link: - gd_txt, no = "", 0 - r = requests.get(link) - soup = BeautifulSoup(r.text, "html.parser") - links = soup.select('a[href*="redirect/main.php?"]') - for a in links: - down = requests.get(a["href"], stream=True, allow_redirects=False) - link = down.headers["location"] - glink = rocklinks(link) - if glink and "gdtot" in glink: - t = requests.get(glink) - soupt = BeautifulSoup(t.text, "html.parser") - title = soupt.select('meta[property^="og:description"]') - no += 1 - gd_txt += f"{no}. {(title[0]['content']).replace('Download ' , '')}\n{glink}\n\n" - return gd_txt - - elif "animeremux" in link: - gd_txt, no = "", 0 - r = requests.get(link) - soup = BeautifulSoup(r.text, "html.parser") - links = soup.select('a[href*="urlshortx.com"]') - gd_txt = f"Total Links Found : {len(links)}\n\n" - for a in links: - link = a["href"] - x = link.split("url=")[-1] - t = requests.get(x) - soupt = BeautifulSoup(t.text, "html.parser") - title = soupt.title - no += 1 - gd_txt += f"{no}. {title.text}\n{x}\n\n" - asleep(1.5) - return gd_txt - - else: - res = requests.get(link) - soup = BeautifulSoup(res.text, "html.parser") - mystx = soup.select(r'a[href^="magnet:?xt=urn:btih:"]') - for hy in mystx: - links.append(hy["href"]) - return links - - -################################################### -# script links - - -def getfinal(domain, url, sess): - - # sess = requests.session() - res = sess.get(url) - soup = BeautifulSoup(res.text, "html.parser") - soup = soup.find("form").findAll("input") - datalist = [] - for ele in soup: - datalist.append(ele.get("value")) - - data = { - "_method": datalist[0], - "_csrfToken": datalist[1], - "ad_form_data": datalist[2], - "_Token[fields]": datalist[3], - "_Token[unlocked]": datalist[4], - } - - sess.headers = { - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", - "Accept": "application/json, text/javascript, */*; q=0.01", - "Accept-Language": "en-US,en;q=0.5", - "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", - "X-Requested-With": "XMLHttpRequest", - "Origin": domain, - "Connection": "keep-alive", - "Referer": url, - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-origin", - } - - # print("waiting 10 secs") - time.sleep(10) # important - response = sess.post(domain + "/links/go", data=data).json() - furl = response["url"] - return furl - - -def getfirst(url): - - sess = requests.session() - res = sess.get(url) - - soup = BeautifulSoup(res.text, "html.parser") - soup = soup.find("form") - action = soup.get("action") - soup = soup.findAll("input") - datalist = [] - for ele in soup: - datalist.append(ele.get("value")) - sess.headers = { - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.5", - "Origin": action, - "Connection": "keep-alive", - "Referer": action, - "Upgrade-Insecure-Requests": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "same-origin", - "Sec-Fetch-User": "?1", - } - - data = {"newwpsafelink": datalist[1], "g-recaptcha-response": RecaptchaV3()} - response = sess.post(action, data=data) - soup = BeautifulSoup(response.text, "html.parser") - soup = soup.findAll("div", class_="wpsafe-bottom text-center") - for ele in soup: - rurl = ele.find("a").get("onclick")[13:-12] - - res = sess.get(rurl) - furl = res.url - # print(furl) - return getfinal(f'https://{furl.split("/")[-2]}/', furl, sess) - - -#################################################################################################### -# ez4short - - -def ez4(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://ez4short.com" - ref = "https://techmody.io/" - h = {"referer": ref} - resp = client.get(url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -################################################ -# ola movies - - -def olamovies(url): - - print("this takes time, you might want to take a break.") - headers = { - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.5", - "Referer": url, - "Alt-Used": "olamovies.ink", - "Connection": "keep-alive", - "Upgrade-Insecure-Requests": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "same-origin", - "Sec-Fetch-User": "?1", - } - - client = cloudscraper.create_scraper(allow_brotli=False) - res = client.get(url) - soup = BeautifulSoup(res.text, "html.parser") - soup = soup.findAll("div", class_="wp-block-button") - - outlist = [] - for ele in soup: - outlist.append(ele.find("a").get("href")) - - slist = [] - for ele in outlist: - try: - key = ( - ele.split("?key=")[1] - .split("&id=")[0] - .replace("%2B", "+") - .replace("%3D", "=") - .replace("%2F", "/") - ) - id = ele.split("&id=")[1] - except: - continue - - count = 3 - params = {"key": key, "id": id} - soup = "None" - - while ( - "rocklinks.net" not in soup - and "try2link.com" not in soup - and "ez4short.com" not in soup - ): - res = client.get( - "https://olamovies.ink/download/", params=params, headers=headers - ) - soup = BeautifulSoup(res.text, "html.parser") - soup = soup.findAll("a")[0].get("href") - if soup != "": - if ( - "try2link.com" in soup - or "rocklinks.net" in soup - or "ez4short.com" in soup - ): - slist.append(soup) - else: - pass - else: - if count == 0: - break - else: - count -= 1 - - time.sleep(10) - - final = [] - for ele in slist: - if "rocklinks.net" in ele: - final.append(rocklinks(ele)) - elif "try2link.com" in ele: - final.append(try2link_bypass(ele)) - elif "ez4short.com" in ele: - final.append(ez4(ele)) - else: - pass - - links = "" - for ele in final: - links = links + ele + "\n" - return links[:-1] - - -############################################### -# katdrive - - -def parse_info_katdrive(res): - info_parsed = {} - title = re.findall(">(.*?)<\/h4>", res.text)[0] - info_chunks = re.findall(">(.*?)<\/td>", res.text) - info_parsed["title"] = title - for i in range(0, len(info_chunks), 2): - info_parsed[info_chunks[i]] = info_chunks[i + 1] - return info_parsed - - -def katdrive_dl(url, katcrypt): - client = requests.Session() - client.cookies.update({"crypt": katcrypt}) - - res = client.get(url) - info_parsed = parse_info_katdrive(res) - info_parsed["error"] = False - - up = urlparse(url) - req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download" - - file_id = url.split("/")[-1] - data = {"id": file_id} - headers = {"x-requested-with": "XMLHttpRequest"} - - try: - res = client.post(req_url, headers=headers, data=data).json()["file"] - except: - return "Error" # {'error': True, 'src_url': url} - - gd_id = re.findall("gd=(.*)", res, re.DOTALL)[0] - info_parsed["gdrive_url"] = f"https://drive.google.com/open?id={gd_id}" - info_parsed["src_url"] = url - return info_parsed["gdrive_url"] - - -############################################### -# hubdrive - - -def parse_info_hubdrive(res): - info_parsed = {} - title = re.findall(">(.*?)<\/h4>", res.text)[0] - info_chunks = re.findall(">(.*?)<\/td>", res.text) - info_parsed["title"] = title - for i in range(0, len(info_chunks), 2): - info_parsed[info_chunks[i]] = info_chunks[i + 1] - return info_parsed - - -def hubdrive_dl(url, hcrypt): - client = requests.Session() - client.cookies.update({"crypt": hcrypt}) - - res = client.get(url) - info_parsed = parse_info_hubdrive(res) - info_parsed["error"] = False - - up = urlparse(url) - req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download" - - file_id = url.split("/")[-1] - data = {"id": file_id} - headers = {"x-requested-with": "XMLHttpRequest"} - - try: - res = client.post(req_url, headers=headers, data=data).json()["file"] - except: - return "Error" # {'error': True, 'src_url': url} - - gd_id = re.findall("gd=(.*)", res, re.DOTALL)[0] - info_parsed["gdrive_url"] = f"https://drive.google.com/open?id={gd_id}" - info_parsed["src_url"] = url - return info_parsed["gdrive_url"] - - -################################################# -# drivefire - - -def parse_info_drivefire(res): - info_parsed = {} - title = re.findall(">(.*?)<\/h4>", res.text)[0] - info_chunks = re.findall(">(.*?)<\/td>", res.text) - info_parsed["title"] = title - for i in range(0, len(info_chunks), 2): - info_parsed[info_chunks[i]] = info_chunks[i + 1] - return info_parsed - - -def drivefire_dl(url, dcrypt): - client = requests.Session() - client.cookies.update({"crypt": dcrypt}) - - res = client.get(url) - info_parsed = parse_info_drivefire(res) - info_parsed["error"] = False - - up = urlparse(url) - req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download" - - file_id = url.split("/")[-1] - data = {"id": file_id} - headers = {"x-requested-with": "XMLHttpRequest"} - - try: - res = client.post(req_url, headers=headers, data=data).json()["file"] - except: - return "Error" # {'error': True, 'src_url': url} - - decoded_id = res.rsplit("/", 1)[-1] - info_parsed = f"https://drive.google.com/file/d/{decoded_id}" - return info_parsed - - -################################################## -# kolop - - -def parse_info_kolop(res): - info_parsed = {} - title = re.findall(">(.*?)<\/h4>", res.text)[0] - info_chunks = re.findall(">(.*?)<\/td>", res.text) - info_parsed["title"] = title - for i in range(0, len(info_chunks), 2): - info_parsed[info_chunks[i]] = info_chunks[i + 1] - return info_parsed - - -def kolop_dl(url, kcrypt): - client = requests.Session() - client.cookies.update({"crypt": kcrypt}) - - res = client.get(url) - info_parsed = parse_info_kolop(res) - info_parsed["error"] = False - - up = urlparse(url) - req_url = f"{up.scheme}://{up.netloc}/ajax.php?ajax=download" - - file_id = url.split("/")[-1] - data = {"id": file_id} - headers = {"x-requested-with": "XMLHttpRequest"} - - try: - res = client.post(req_url, headers=headers, data=data).json()["file"] - except: - return "Error" # {'error': True, 'src_url': url} - - gd_id = re.findall("gd=(.*)", res, re.DOTALL)[0] - info_parsed["gdrive_url"] = f"https://drive.google.com/open?id={gd_id}" - info_parsed["src_url"] = url - - return info_parsed["gdrive_url"] - - -################################################## -# mediafire - - -def mediafire(url): - - res = requests.get(url, stream=True) - contents = res.text - - for line in contents.splitlines(): - m = re.search(r'href="((http|https)://download[^"]+)', line) - if m: - return m.groups()[0] - - -#################################################### -# zippyshare - - -def zippyshare(url): - resp = requests.get(url).text - surl = resp.split("document.getElementById('dlbutton').href = ")[1].split(";")[0] - parts = surl.split("(")[1].split(")")[0].split(" ") - val = str(int(parts[0]) % int(parts[2]) + int(parts[4]) % int(parts[6])) - surl = surl.split('"') - burl = url.split("zippyshare.com")[0] - furl = burl + "zippyshare.com" + surl[1] + val + surl[-2] - return furl - - -#################################################### -# filercrypt - - -def getlinks(dlc): - headers = { - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", - "Accept": "application/json, text/javascript, */*", - "Accept-Language": "en-US,en;q=0.5", - "X-Requested-With": "XMLHttpRequest", - "Origin": "http://dcrypt.it", - "Connection": "keep-alive", - "Referer": "http://dcrypt.it/", - } - - data = { - "content": dlc, - } - - response = requests.post( - "http://dcrypt.it/decrypt/paste", headers=headers, data=data - ).json()["success"]["links"] - links = "" - for link in response: - links = links + link + "\n\n" - return links[:-1] - - -def filecrypt(url): - - client = cloudscraper.create_scraper(allow_brotli=False) - headers = { - "authority": "filecrypt.co", - "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", - "accept-language": "en-US,en;q=0.9", - "cache-control": "max-age=0", - "content-type": "application/x-www-form-urlencoded", - "origin": "https://filecrypt.co", - "referer": url, - "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", - } - - resp = client.get(url, headers=headers) - soup = BeautifulSoup(resp.content, "html.parser") - - buttons = soup.find_all("button") - for ele in buttons: - line = ele.get("onclick") - if line != None and "DownloadDLC" in line: - dlclink = ( - "https://filecrypt.co/DLC/" - + line.split("DownloadDLC('")[1].split("'")[0] - + ".html" - ) - break - - resp = client.get(dlclink, headers=headers) - return getlinks(resp.text) - - -##################################################### -# dropbox - - -def dropbox(url): - return ( - url.replace("www.", "") - .replace("dropbox.com", "dl.dropboxusercontent.com") - .replace("?dl=0", "") - ) - - -###################################################### -# shareus - - -def shareus(url): - headers = { - "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", - } - DOMAIN = "https://us-central1-my-apps-server.cloudfunctions.net" - sess = requests.session() - - code = url.split("/")[-1] - params = { - "shortid": code, - "initial": "true", - "referrer": "https://shareus.io/", - } - response = requests.get(f"{DOMAIN}/v", params=params, headers=headers) - - for i in range(1, 4): - json_data = { - "current_page": i, - } - response = sess.post(f"{DOMAIN}/v", headers=headers, json=json_data) - - response = sess.get(f"{DOMAIN}/get_link", headers=headers).json() - return response["link_info"]["destination"] - - -####################################################### -# shortingly - - -def shortingly(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://shortingly.in" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://tech.gyanitheme.com/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(5) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -####################################################### -# Gyanilinks - gtlinks.me - - -def gyanilinks(url): - DOMAIN = "https://go.hipsonyc.com/" - client = cloudscraper.create_scraper(allow_brotli=False) - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - resp = client.get(final_url) - soup = BeautifulSoup(resp.content, "html.parser") - try: - inputs = soup.find(id="go-link").find_all(name="input") - except: - return "Incorrect Link" - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(5) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -####################################################### -# Flashlink - - -def flashl(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://files.earnash.com/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://flash1.cordtpoint.co.in" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(15) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -####################################################### -# short2url - - -def short2url(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://techyuth.xyz/blog" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://blog.coin2pay.xyz/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(10) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -####################################################### -# anonfiles - - -def anonfile(url): - - headersList = {"Accept": "*/*"} - payload = "" - - response = requests.request( - "GET", url, data=payload, headers=headersList - ).text.split("\n") - for ele in response: - if ( - "https://cdn" in ele - and "anonfiles.com" in ele - and url.split("/")[-2] in ele - ): - break - - return ele.split('href="')[1].split('"')[0] - - -########################################################## -# pixl - - -def pixl(url): - count = 1 - dl_msg = "" - currentpage = 1 - settotalimgs = True - totalimages = "" - client = cloudscraper.create_scraper(allow_brotli=False) - resp = client.get(url) - if resp.status_code == 404: - return "File not found/The link you entered is wrong!" - soup = BeautifulSoup(resp.content, "html.parser") - if "album" in url and settotalimgs: - totalimages = soup.find("span", {"data-text": "image-count"}).text - settotalimgs = False - thmbnailanch = soup.findAll(attrs={"class": "--media"}) - links = soup.findAll(attrs={"data-pagination": "next"}) - try: - url = links[0].attrs["href"] - except BaseException: - url = None - for ref in thmbnailanch: - imgdata = client.get(ref.attrs["href"]) - if not imgdata.status_code == 200: - time.sleep(5) - continue - imghtml = BeautifulSoup(imgdata.text, "html.parser") - downloadanch = imghtml.find(attrs={"class": "btn-download"}) - currentimg = downloadanch.attrs["href"] - currentimg = currentimg.replace(" ", "%20") - dl_msg += f"{count}. {currentimg}\n" - count += 1 - currentpage += 1 - fld_msg = f"Your provided Pixl.is link is of Folder and I've Found {count - 1} files in the folder.\n" - fld_link = f"\nFolder Link: {url}\n" - final_msg = fld_link + "\n" + fld_msg + "\n" + dl_msg - return final_msg - - -############################################################ -# sirigan ( unused ) - - -def siriganbypass(url): - client = requests.Session() - res = client.get(url) - url = res.url.split("=", maxsplit=1)[-1] - - while True: - try: - url = base64.b64decode(url).decode("utf-8") - except: - break - - return url.split("url=")[-1] - - -############################################################ -# shorte - - -def sh_st_bypass(url): - client = requests.Session() - client.headers.update({"referer": url}) - p = urlparse(url) - - res = client.get(url) - - sess_id = re.findall("""sessionId(?:\s+)?:(?:\s+)?['|"](.*?)['|"]""", res.text)[0] - - final_url = f"{p.scheme}://{p.netloc}/shortest-url/end-adsession" - params = {"adSessionId": sess_id, "callback": "_"} - time.sleep(5) # !important - - res = client.get(final_url, params=params) - dest_url = re.findall('"(.*?)"', res.text)[1].replace("\/", "/") - - return {"src": url, "dst": dest_url}["dst"] - - -############################################################# -# gofile - - -def gofile_dl(url, password=""): - api_uri = "https://api.gofile.io" - client = requests.Session() - res = client.get(api_uri + "/createAccount").json() - - data = { - "contentId": url.split("/")[-1], - "token": res["data"]["token"], - "websiteToken": "12345", - "cache": "true", - "password": hashlib.sha256(password.encode("utf-8")).hexdigest(), - } - res = client.get(api_uri + "/getContent", params=data).json() - - content = [] - for item in res["data"]["contents"].values(): - content.append(item) - - return {"accountToken": data["token"], "files": content}["files"][0]["link"] - - -################################################################ -# sharer pw - - -def parse_info_sharer(res): - f = re.findall(">(.*?)<\/td>", res.text) - info_parsed = {} - for i in range(0, len(f), 3): - info_parsed[f[i].lower().replace(" ", "_")] = f[i + 2] - return info_parsed - - -def sharer_pw(url, Laravel_Session, XSRF_TOKEN, forced_login=False): - client = cloudscraper.create_scraper(allow_brotli=False) - client.cookies.update( - {"XSRF-TOKEN": XSRF_TOKEN, "laravel_session": Laravel_Session} - ) - res = client.get(url) - token = re.findall("_token\s=\s'(.*?)'", res.text, re.DOTALL)[0] - ddl_btn = etree.HTML(res.content).xpath("//button[@id='btndirect']") - info_parsed = parse_info_sharer(res) - info_parsed["error"] = True - info_parsed["src_url"] = url - info_parsed["link_type"] = "login" - info_parsed["forced_login"] = forced_login - headers = { - "content-type": "application/x-www-form-urlencoded; charset=UTF-8", - "x-requested-with": "XMLHttpRequest", - } - data = {"_token": token} - if len(ddl_btn): - info_parsed["link_type"] = "direct" - if not forced_login: - data["nl"] = 1 - try: - res = client.post(url + "/dl", headers=headers, data=data).json() - except: - return info_parsed - if "url" in res and res["url"]: - info_parsed["error"] = False - info_parsed["gdrive_link"] = res["url"] - if len(ddl_btn) and not forced_login and not "url" in info_parsed: - # retry download via login - return sharer_pw(url, Laravel_Session, XSRF_TOKEN, forced_login=True) - return info_parsed["gdrive_link"] - - -################################################################# -# gdtot - - -def gdtot(url): - cget = create_scraper().request - try: - res = cget("GET", f'https://gdbot.xyz/file/{url.split("/")[-1]}') - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - token_url = etree.HTML(res.content).xpath( - "//a[contains(@class,'inline-flex items-center justify-center')]/@href" - ) - if not token_url: - try: - url = cget("GET", url).url - p_url = urlparse(url) - res = cget( - "GET", f"{p_url.scheme}://{p_url.hostname}/ddl/{url.split('/')[-1]}" - ) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if ( - drive_link := re.findall(r"myDl\('(.*?)'\)", res.text) - ) and "drive.google.com" in drive_link[0]: - return drive_link[0] - else: - return "ERROR: Drive Link not found, Try in your broswer" - token_url = token_url[0] - try: - token_page = cget("GET", token_url) - except Exception as e: - return f"ERROR: {e.__class__.__name__} with {token_url}" - path = re.findall('\("(.*?)"\)', token_page.text) - if not path: - return "ERROR: Cannot bypass this" - path = path[0] - raw = urlparse(token_url) - final_url = f"{raw.scheme}://{raw.hostname}{path}" - return ddl.sharer_scraper(final_url) - - -################################################################## -# adfly - - -def decrypt_url(code): - a, b = "", "" - for i in range(0, len(code)): - if i % 2 == 0: - a += code[i] - else: - b = code[i] + b - key = list(a + b) - i = 0 - while i < len(key): - if key[i].isdigit(): - for j in range(i + 1, len(key)): - if key[j].isdigit(): - u = int(key[i]) ^ int(key[j]) - if u < 10: - key[i] = str(u) - i = j - break - i += 1 - key = "".join(key) - decrypted = base64.b64decode(key)[16:-16] - return decrypted.decode("utf-8") - - -def adfly(url): - client = cloudscraper.create_scraper(allow_brotli=False) - res = client.get(url).text - out = {"error": False, "src_url": url} - try: - ysmm = re.findall("ysmm\s+=\s+['|\"](.*?)['|\"]", res)[0] - except: - out["error"] = True - return out - url = decrypt_url(ysmm) - if re.search(r"go\.php\?u\=", url): - url = base64.b64decode(re.sub(r"(.*?)u=", "", url)).decode() - elif "&dest=" in url: - url = unquote(re.sub(r"(.*?)dest=", "", url)) - out["bypassed_url"] = url - return out - - -############################################################################################## -# gplinks - - -def gplinks(url: str): - client = cloudscraper.create_scraper(allow_brotli=False) - token = url.split("/")[-1] - domain = "https://gplinks.co/" - referer = "https://mynewsmedia.co/" - vid = client.get(url, allow_redirects=False).headers["Location"].split("=")[-1] - url = f"{url}/?{vid}" - response = client.get(url, allow_redirects=False) - soup = BeautifulSoup(response.content, "html.parser") - inputs = soup.find(id="go-link").find_all(name="input") - data = {input.get("name"): input.get("value") for input in inputs} - time.sleep(10) - headers = {"x-requested-with": "XMLHttpRequest"} - bypassed_url = client.post(domain + "links/go", data=data, headers=headers).json()[ - "url" - ] - try: - return bypassed_url - except: - return "Something went wrong :(" - - -###################################################################################################### -# droplink - - -def droplink(url): - client = cloudscraper.create_scraper(allow_brotli=False) - res = client.get(url, timeout=5) - - ref = re.findall("action[ ]{0,}=[ ]{0,}['|\"](.*?)['|\"]", res.text)[0] - h = {"referer": ref} - res = client.get(url, headers=h) - - bs4 = BeautifulSoup(res.content, "html.parser") - inputs = bs4.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = { - "content-type": "application/x-www-form-urlencoded", - "x-requested-with": "XMLHttpRequest", - } - - p = urlparse(url) - final_url = f"{p.scheme}://{p.netloc}/links/go" - time.sleep(3.1) - res = client.post(final_url, data=data, headers=h).json() - - if res["status"] == "success": - return res["url"] - return "Something went wrong :(" - - -##################################################################################################################### -# link vertise - - -def linkvertise(url): - params = { - "url": url, - } - response = requests.get("https://bypass.pm/bypass2", params=params).json() - if response["success"]: - return response["destination"] - else: - return response["msg"] - - -################################################################################################################### -# others - - -def others(url): - return "API Currently not Available" - - -################################################################################################################# -# ouo - - -# RECAPTCHA v3 BYPASS -# code from https://github.com/xcscxr/Recaptcha-v3-bypass -def RecaptchaV3(): - ANCHOR_URL = "https://www.google.com/recaptcha/api2/anchor?ar=1&k=6Lcr1ncUAAAAAH3cghg6cOTPGARa8adOf-y9zv2x&co=aHR0cHM6Ly9vdW8ucHJlc3M6NDQz&hl=en&v=pCoGBhjs9s8EhFOHJFe8cqis&size=invisible&cb=ahgyd1gkfkhe" - url_base = "https://www.google.com/recaptcha/" - post_data = "v={}&reason=q&c={}&k={}&co={}" - client = requests.Session() - client.headers.update({"content-type": "application/x-www-form-urlencoded"}) - matches = re.findall("([api2|enterprise]+)\/anchor\?(.*)", ANCHOR_URL)[0] - url_base += matches[0] + "/" - params = matches[1] - res = client.get(url_base + "anchor", params=params) - token = re.findall(r'"recaptcha-token" value="(.*?)"', res.text)[0] - params = dict(pair.split("=") for pair in params.split("&")) - post_data = post_data.format(params["v"], token, params["k"], params["co"]) - res = client.post(url_base + "reload", params=f'k={params["k"]}', data=post_data) - answer = re.findall(r'"rresp","(.*?)"', res.text)[0] - return answer - - -# code from https://github.com/xcscxr/ouo-bypass/ -def ouo(url): - tempurl = url.replace("ouo.press", "ouo.io") - p = urlparse(tempurl) - id = tempurl.split("/")[-1] - client = Nreq.Session( - headers={ - "authority": "ouo.io", - "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", - "accept-language": "en-GB,en-US;q=0.9,en;q=0.8", - "cache-control": "max-age=0", - "referer": "http://www.google.com/ig/adde?moduleurl=", - "upgrade-insecure-requests": "1", - } - ) - res = client.get(tempurl, impersonate="chrome110") - next_url = f"{p.scheme}://{p.hostname}/go/{id}" - - for _ in range(2): - if res.headers.get("Location"): - break - bs4 = BeautifulSoup(res.content, "lxml") - inputs = bs4.form.findAll("input", {"name": re.compile(r"token$")}) - data = {input.get("name"): input.get("value") for input in inputs} - data["x-token"] = RecaptchaV3() - header = {"content-type": "application/x-www-form-urlencoded"} - res = client.post( - next_url, - data=data, - headers=header, - allow_redirects=False, - impersonate="chrome110", - ) - next_url = f"{p.scheme}://{p.hostname}/xreallcygo/{id}" - - return res.headers.get("Location") - - -#################################################################################################################### -# mdisk - - -def mdisk(url): - header = { - "Accept": "*/*", - "Accept-Language": "en-US,en;q=0.5", - "Accept-Encoding": "gzip, deflate, br", - "Referer": "https://mdisk.me/", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36", - } - - inp = url - fxl = inp.split("/") - cid = fxl[-1] - - URL = f"https://diskuploader.entertainvideo.com/v1/file/cdnurl?param={cid}" - res = requests.get(url=URL, headers=header).json() - return res["download"] + "\n\n" + res["source"] - - -################################################################################################################## -# AppDrive or DriveApp etc. Look-Alike Link and as well as the Account Details (Required for Login Required Links only) - - -def unified(url): - - if ddl.is_share_link(url): - if "https://gdtot" in url: - return ddl.gdtot(url) - else: - return ddl.sharer_scraper(url) - - try: - Email = "chzeesha4@gmail.com" - Password = "zeeshi#789" - - account = {"email": Email, "passwd": Password} - client = cloudscraper.create_scraper(allow_brotli=False) - client.headers.update( - { - "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" - } - ) - data = {"email": account["email"], "password": account["passwd"]} - client.post(f"https://{urlparse(url).netloc}/login", data=data) - res = client.get(url) - key = re.findall('"key",\s+"(.*?)"', res.text)[0] - ddl_btn = etree.HTML(res.content).xpath("//button[@id='drc']") - info = re.findall(">(.*?)<\/li>", res.text) - info_parsed = {} - for item in info: - kv = [s.strip() for s in item.split(": ", maxsplit=1)] - info_parsed[kv[0].lower()] = kv[1] - info_parsed = info_parsed - info_parsed["error"] = False - info_parsed["link_type"] = "login" - headers = { - "Content-Type": f"multipart/form-data; boundary={'-'*4}_", - } - data = {"type": 1, "key": key, "action": "original"} - if len(ddl_btn): - info_parsed["link_type"] = "direct" - data["action"] = "direct" - while data["type"] <= 3: - boundary = f'{"-"*6}_' - data_string = "" - for item in data: - data_string += f"{boundary}\r\n" - data_string += f'Content-Disposition: form-data; name="{item}"\r\n\r\n{data[item]}\r\n' - data_string += f"{boundary}--\r\n" - gen_payload = data_string - try: - response = client.post(url, data=gen_payload, headers=headers).json() - break - except BaseException: - data["type"] += 1 - if "url" in response: - info_parsed["gdrive_link"] = response["url"] - elif "error" in response and response["error"]: - info_parsed["error"] = True - info_parsed["error_message"] = response["message"] - else: - info_parsed["error"] = True - info_parsed["error_message"] = "Something went wrong :(" - if info_parsed["error"]: - return info_parsed - if "driveapp" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - info_parsed["src_url"] = url - if "drivehub" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - if "gdflix" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - - if "drivesharer" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - if "drivebit" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - if "drivelinks" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - if "driveace" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - if "drivepro" in urlparse(url).netloc and not info_parsed["error"]: - res = client.get(info_parsed["gdrive_link"]) - drive_link = etree.HTML(res.content).xpath( - "//a[contains(@class,'btn')]/@href" - )[0] - info_parsed["gdrive_link"] = drive_link - if info_parsed["error"]: - return "Faced an Unknown Error!" - return info_parsed["gdrive_link"] - except BaseException: - return "Unable to Extract GDrive Link" - - -##################################################################################################### -# urls open - - -def urlsopen(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://blogpost.viewboonposts.com/e998933f1f665f5e75f2d1ae0009e0063ed66f889000" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://blog.textpage.xyz/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(2) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -#################################################################################################### -# URLShortX - xpshort - - -def xpshort(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://xpshort.com" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://www.animalwallpapers.online/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -#################################################################################################### -# Vnshortner- - - -def vnshortener(url): - sess = requests.session() - DOMAIN = "https://vnshortener.com/" - org = "https://nishankhatri.xyz" - PhpAcc = DOMAIN + "link/new.php" - ref = "https://nishankhatri.com.np/" - go = DOMAIN + "links/go" - - code = url.split("/")[3] - final_url = f"{DOMAIN}/{code}/" - headers = {"authority": DOMAIN, "origin": org} - - data = { - "step_1": code, - } - response = sess.post(PhpAcc, headers=headers, data=data).json() - id = response["inserted_data"]["id"] - data = { - "step_2": code, - "id": id, - } - response = sess.post(PhpAcc, headers=headers, data=data).json() - - headers["referer"] = ref - params = {"sid": str(id)} - resp = sess.get(final_url, params=params, headers=headers) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - - time.sleep(1) - headers["x-requested-with"] = "XMLHttpRequest" - try: - r = sess.post(go, data=data, headers=headers).json() - if r["status"] == "success": - return r["url"] - else: - raise - except: - return "Something went wrong :(" - - -##################################################################################################### -# onepagelink - - -def onepagelink(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "go.onepagelink.in" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"https://{DOMAIN}/{code}" - ref = "https://gorating.in/" - h = {"referer": ref} - response = client.get(final_url, headers=h) - soup = BeautifulSoup(response.text, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(5) - r = client.post(f"https://{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except BaseException: - return "Something went wrong :(" - - -##################################################################################################### -# dulink - - -def dulink(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://du-link.in" - url = url[:-1] if url[-1] == "/" else url - ref = "https://profitshort.com/" - h = {"referer": ref} - resp = client.get(url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# krownlinks - - -def krownlinks(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://go.bloggerishyt.in/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://www.techkhulasha.com/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return str(r.json()["url"]) - except BaseException: - return "Something went wrong :(" - - -#################################################################################################### -# adrinolink - - -def adrinolink(url): - if "https://adrinolinks.in/" not in url: - url = "https://adrinolinks.in/" + url.split("/")[-1] - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://adrinolinks.in" - ref = "https://wikitraveltips.com/" - h = {"referer": ref} - resp = client.get(url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# mdiskshortners - - -def mdiskshortners(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://mdiskshortners.in/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://www.adzz.in/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(2) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# tinyfy - - -def tiny(url): - client = requests.session() - DOMAIN = "https://tinyfy.in" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://www.yotrickslog.tech/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# earnl - - -def earnl(url): - client = requests.session() - DOMAIN = "https://v.earnl.xyz" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://link.modmakers.xyz/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(5) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# moneykamalo - - -def moneykamalo(url): - client = requests.session() - DOMAIN = "https://go.moneykamalo.com" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://bloging.techkeshri.com/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(5) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# lolshort - - -def lolshort(url): - client = requests.session() - DOMAIN = "https://get.lolshort.tech/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://tech.animezia.com/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(5) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# easysky - - -def easysky(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://techy.veganab.co/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://veganab.co/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# indiurl - - -def indi(url): - client = requests.session() - DOMAIN = "https://file.earnash.com/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://indiurl.cordtpoint.co.in/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(10) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# linkbnao - - -def linkbnao(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://vip.linkbnao.com" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://ffworld.xyz/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(2) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# omegalinks - - -def mdiskpro(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://mdisk.pro" - ref = "https://m.meclipstudy.in/" - h = {"referer": ref} - resp = client.get(url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# tnshort - - -def tnshort(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://news.sagenews.in/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://movies.djnonstopmusic.in/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(8) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return str(r.json()["url"]) - except BaseException: - return "Something went wrong :(" - - -##################################################################################################### -# tnvalue - - -def tnvalue(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://gadgets.webhostingtips.club/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://ladkibahin.com/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(12) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return str(r.json()["url"]) - except BaseException: - return "Something went wrong :(" - - -##################################################################################################### -# indianshortner - - -def indshort(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://indianshortner.com/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://moddingzone.in/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(5) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# mdisklink - - -def mdisklink(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://mdisklink.link/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://m.proappapk.com/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(2) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except: - return "Something went wrong :(" - - -##################################################################################################### -# rslinks - - -def rslinks(url): - client = requests.session() - download = requests.get(url, stream=True, allow_redirects=False) - v = download.headers["location"] - code = v.split("ms9")[-1] - final = f"http://techyproio.blogspot.com/p/short.html?{code}==" - try: - return final - except: - return "Something went wrong :(" - - -######################### -# vipurl -def vipurl(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://count.vipurl.in/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://ezeviral.com/" - h = {"referer": ref} - response = client.get(final_url, headers=h) - soup = BeautifulSoup(response.text, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(9) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return r.json()["url"] - except BaseException: - return "Something went wrong :(" - - -##################################################################################################### -# mdisky.link -def mdisky(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://go.bloggingaro.com/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://www.bloggingaro.com/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(6) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return str(r.json()["url"]) - except BaseException: - return "Something went wrong :(" - - -##################################################################################################### -# bitly + tinyurl - - -def bitly_tinyurl(url: str) -> str: - response = requests.get(url).url - try: - return response - except: - return "Something went wrong :(" - - -##################################################################################################### -# thinfi - - -def thinfi(url: str) -> str: - response = requests.get(url) - soup = BeautifulSoup(response.content, "html.parser").p.a.get("href") - try: - return soup - except: - return "Something went wrong :(" - - -##################################################################################################### -# kingurl - - -def kingurl1(url): - client = cloudscraper.create_scraper(allow_brotli=False) - DOMAIN = "https://go.kingurl.in/" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}/{code}" - ref = "https://earnbox.bankshiksha.in/" - h = {"referer": ref} - resp = client.get(final_url, headers=h) - soup = BeautifulSoup(resp.content, "html.parser") - inputs = soup.find_all("input") - data = {input.get("name"): input.get("value") for input in inputs} - h = {"x-requested-with": "XMLHttpRequest"} - time.sleep(7) - r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) - try: - return str(r.json()["url"]) - except BaseException: - return "Something went wrong :(" - - -def kingurl(url): - DOMAIN = "https://earn.bankshiksha.in/click.php?LinkShortUrlID" - url = url[:-1] if url[-1] == "/" else url - code = url.split("/")[-1] - final_url = f"{DOMAIN}={code}" - return final_url -##################################################################################################### -# helpers - - -# check if present in list -def ispresent(inlist, url): - for ele in inlist: - if ele in url: - return True - return False - - -# shortners -def shortners(url): - # Shortner Full Page API - if val := shortner_fpage_api(url): - return val - - # Shortner Quick Link API - elif val := shortner_quick_api(url): - return val - - # igg games - elif "https://igg-games.com/" in url: - print("entered igg: ", url) - return igggames(url) - - # ola movies - elif "https://olamovies." in url: - print("entered ola movies: ", url) - return olamovies(url) - - # katdrive - elif "https://katdrive." in url: - if KATCRYPT == "": - return "🚫 __You can't use this because__ **KATDRIVE_CRYPT** __ENV is not set__" - - print("entered katdrive: ", url) - return katdrive_dl(url, KATCRYPT) - - # kolop - elif "https://kolop." in url: - if KCRYPT == "": - return ( - "🚫 __You can't use this because__ **KOLOP_CRYPT** __ENV is not set__" - ) - - print("entered kolop: ", url) - return kolop_dl(url, KCRYPT) - - # hubdrive - elif "https://hubdrive." in url: - if HCRYPT == "": - return "🚫 __You can't use this because__ **HUBDRIVE_CRYPT** __ENV is not set__" - - print("entered hubdrive: ", url) - return hubdrive_dl(url, HCRYPT) - - # drivefire - elif "https://drivefire." in url: - if DCRYPT == "": - return "🚫 __You can't use this because__ **DRIVEFIRE_CRYPT** __ENV is not set__" - - print("entered drivefire: ", url) - return drivefire_dl(url, DCRYPT) - - # filecrypt - elif ("https://filecrypt.co/") in url or ("https://filecrypt.cc/" in url): - print("entered filecrypt: ", url) - return filecrypt(url) - - # shareus - elif "https://shareus." in url or "https://shrs.link/" in url: - print("entered shareus: ", url) - return shareus(url) - - # shortingly - elif "https://shortingly.in/" in url: - print("entered shortingly: ", url) - return shortingly(url) - - # vnshortner - elif "https://vnshortener.com/" in url: - print("entered vnshortener: ", url) - return vnshortener(url) - - # onepagelink - elif "https://onepagelink.in/" in url: - print("entered onepagelink: ", url) - return onepagelink(url) - - # gyanilinks - elif "https://gyanilinks.com/" in url or "https://gtlinks.me/" in url: - print("entered gyanilinks: ", url) - return gyanilinks(url) - - # flashlink - elif "https://go.flashlink.in" in url: - print("entered flashlink: ", url) - return flashl(url) - - # short2url - elif "https://short2url.in/" in url: - print("entered short2url: ", url) - return short2url(url) - - # shorte - elif "https://shorte.st/" in url: - print("entered shorte: ", url) - return sh_st_bypass(url) - - # psa - elif "https://psa.wf/" in url: - print("entered psa: ", url) - return psa_bypasser(url) - - # sharer pw - elif "https://sharer.pw/" in url: - if XSRF_TOKEN == "" or Laravel_Session == "": - return "🚫 __You can't use this because__ **XSRF_TOKEN** __and__ **Laravel_Session** __ENV is not set__" - - print("entered sharer: ", url) - return sharer_pw(url, Laravel_Session, XSRF_TOKEN) - - # gdtot url - elif "gdtot.cfd" in url: - print("entered gdtot: ", url) - return gdtot(url) - - # adfly - elif "https://adf.ly/" in url: - print("entered adfly: ", url) - out = adfly(url) - return out["bypassed_url"] - - # gplinks - elif "https://gplinks.co/" in url: - print("entered gplink: ", url) - return gplinks(url) - - # droplink - elif "https://droplink.co/" in url: - print("entered droplink: ", url) - return droplink(url) - - # linkvertise - elif "https://linkvertise.com/" in url: - print("entered linkvertise: ", url) - return linkvertise(url) - - # rocklinks - elif "https://rocklinks.net/" in url: - print("entered rocklinks: ", url) - return rocklinks(url) - - # ouo - elif "https://ouo.press/" in url or "https://ouo.io/" in url: - print("entered ouo: ", url) - return ouo(url) - - # try2link - elif "https://try2link.com/" in url: - print("entered try2links: ", url) - return try2link_bypass(url) - - # urlsopen - elif "https://urlsopen." in url: - print("entered urlsopen: ", url) - return urlsopen(url) - - # xpshort - elif ( - "https://xpshort.com/" in url - or "https://push.bdnewsx.com/" in url - or "https://techymozo.com/" in url - ): - print("entered xpshort: ", url) - return xpshort(url) - - # dulink - elif "https://du-link.in/" in url: - print("entered dulink: ", url) - return dulink(url) - - # ez4short - elif "https://ez4short.com/" in url: - print("entered ez4short: ", url) - return ez4(url) - - # krownlinks - elif "https://krownlinks.me/" in url: - print("entered krownlinks: ", url) - return krownlinks(url) - - # adrinolink - elif "https://adrinolinks." in url: - print("entered adrinolink: ", url) - return adrinolink(url) - - # tnlink - elif "https://link.tnlink.in/" in url: - print("entered tnlink: ", url) - return tnlink(url) - - # mdiskshortners - elif "https://mdiskshortners.in/" in url: - print("entered mdiskshortners: ", url) - return mdiskshortners(url) - - # tinyfy - elif "tinyfy.in" in url: - print("entered tinyfy: ", url) - return tiny(url) - - # earnl - elif "go.earnl.xyz" in url: - print("entered earnl: ", url) - return earnl(url) - - # moneykamalo - elif "earn.moneykamalo.com" in url: - print("entered moneykamalo: ", url) - return moneykamalo(url) - - # lolshort - elif "http://go.lolshort.tech/" in url or "https://go.lolshort.tech/" in url: - print("entered lolshort: ", url) - return lolshort(url) - - # easysky - elif "m.easysky.in" in url: - print("entered easysky: ", url) - return easysky(url) - - # indiurl - elif "go.indiurl.in.net" in url: - print("entered indiurl: ", url) - return indi(url) - - # linkbnao - elif "linkbnao.com" in url: - print("entered linkbnao: ", url) - return linkbnao(url) - - # omegalinks - elif "mdisk.pro" in url: - print("entered mdiskpro: ", url) - return mdiskpro(url) - - # tnshort - elif "https://link.tnshort.net/" in url or "https://tnseries.com/" in url or "https://link.tnseries.com/" in url: - print("entered tnshort:", url) - return tnshort(url) - - # tnvalue - elif ( - "https://link.tnvalue.in/" in url - or "https://short.tnvalue.in/" in url - or "https://page.finclub.in/" in url - ): - print("entered tnvalue:", url) - return tnvalue(url) - - # indianshortner - elif "indianshortner.in" in url: - print("entered indianshortner: ", url) - return indshort(url) - - # mdisklink - elif "mdisklink.link" in url: - print("entered mdisklink: ", url) - return mdisklink(url) - - # rslinks - elif "rslinks.net" in url: - print("entered rslinks: ", url) - return rslinks(url) - - # bitly + tinyurl - elif "bit.ly" in url or "tinyurl.com" in url: - print("entered bitly_tinyurl: ", url) - return bitly_tinyurl(url) - - # pdisk - elif "pdisk.pro" in url: - print("entered pdisk: ", url) - return pdisk(url) - - # thinfi - elif "thinfi.com" in url: - print("entered thinfi: ", url) - return thinfi(url) - - # vipurl - elif "link.vipurl.in" in url or "count.vipurl.in" in url or "vipurl.in" in url: - print("entered vipurl:", url) - return vipurl(url) - - # mdisky - elif "mdisky.link" in url: - print("entered mdisky:", url) - return mdisky(url) - - # kingurl - elif "https://kingurl.in/" in url: - print("entered kingurl:", url) - return kingurl(url) - - # htpmovies sharespark cinevood - elif ( - "https://htpmovies." in url - or "https://sharespark.me/" in url - or "https://cinevood." in url - or "https://atishmkv." in url - or "https://teluguflix" in url - or "https://taemovies" in url - or "https://toonworld4all" in url - or "https://animeremux" in url - ): - print("entered htpmovies sharespark cinevood atishmkv: ", url) - return scrappers(url) - - # gdrive look alike - elif ispresent(gdlist, url): - print("entered gdrive look alike: ", url) - return unified(url) - - # others - elif ispresent(otherslist, url): - print("entered others: ", url) - return others(url) - - # else - else: - print("entered: ", url) - return "Not in Supported Sites" - - -################################################################################################################################ diff --git a/config.json b/config.json index 7f02136c..344936ec 100644 --- a/config.json +++ b/config.json @@ -13,7 +13,5 @@ "TERA_COOKIE": "", "CLOUDFLARE": "", "PORT": 5000, - "DB_API": "", - "DB_OWNER": "bipinkrish", - "DB_NAME": "link_bypass.db" + "MONGODB_URI": null } \ No newline at end of file diff --git a/db.py b/db.py deleted file mode 100644 index 8e3b6e7d..00000000 --- a/db.py +++ /dev/null @@ -1,48 +0,0 @@ -import requests -import base64 - -class DB: - def __init__(self, api_key, db_owner, db_name) -> None: - self.api_key = api_key - self.db_owner = db_owner - self.db_name = db_name - self.url = "https://api.dbhub.io/v1/tables" - self.data = { - "apikey": self.api_key, - "dbowner": self.db_owner, - "dbname": self.db_name - } - - response = requests.post(self.url, data=self.data) - if response.status_code == 200: - if "results" not in response.json(): - raise Exception("Error, Table not found") - else: - raise Exception("Error in Auth") - - def insert(self, link: str, result: str): - url = "https://api.dbhub.io/v1/execute" - sql_insert = f"INSERT INTO results (link, result) VALUES ('{link}', '{result}')" - encoded_sql = base64.b64encode(sql_insert.encode()).decode() - self.data["sql"] = encoded_sql - response = requests.post(url, data=self.data) - if response.status_code == 200: - if response.json()["status"] != "OK": - raise Exception("Error while inserting") - return True - else: - print(response.json()) - return None - - def find(self, link: str): - url = "https://api.dbhub.io/v1/query" - sql_select = f"SELECT result FROM results WHERE link = '{link}'" - encoded_sql = base64.b64encode(sql_select.encode()).decode() - self.data["sql"] = encoded_sql - response = requests.post(url, data=self.data) - if response.status_code == 200: - try: return response.json()[0][0]["Value"] - except: return None - else: - print(response.json()) - return None diff --git a/ddl.py b/ddl.py deleted file mode 100644 index 7f505fb8..00000000 --- a/ddl.py +++ /dev/null @@ -1,991 +0,0 @@ -from base64 import standard_b64encode -from json import loads -from math import floor, pow -from re import findall, match, search, sub -from time import sleep -from urllib.parse import quote, unquote, urlparse -from uuid import uuid4 - -from bs4 import BeautifulSoup -from cfscrape import create_scraper -from lxml import etree -from requests import get, session - -from json import load -from os import environ - -with open("config.json", "r") as f: - DATA = load(f) - - -def getenv(var): - return environ.get(var) or DATA.get(var, None) - - -UPTOBOX_TOKEN = getenv("UPTOBOX_TOKEN") -ndus = getenv("TERA_COOKIE") -if ndus is None: - TERA_COOKIE = None -else: - TERA_COOKIE = {"ndus": ndus} - - -ddllist = [ - "1drv.ms", - "1fichier.com", - "4funbox", - "akmfiles", - "anonfiles.com", - "antfiles.com", - "bayfiles.com", - "disk.yandex.com", - "fcdn.stream", - "femax20.com", - "fembed.com", - "fembed.net", - "feurl.com", - "filechan.org", - "filepress", - "github.com", - "hotfile.io", - "hxfile.co", - "krakenfiles.com", - "layarkacaxxi.icu", - "letsupload.cc", - "letsupload.io", - "linkbox", - "lolabits.se", - "mdisk.me", - "mediafire.com", - "megaupload.nz", - "mirrobox", - "mm9842.com", - "momerybox", - "myfile.is", - "naniplay.com", - "naniplay.nanime.biz", - "naniplay.nanime.in", - "nephobox", - "openload.cc", - "osdn.net", - "pixeldrain.com", - "racaty", - "rapidshare.nu", - "sbembed.com", - "sbplay.org", - "share-online.is", - "shrdsk", - "solidfiles.com", - "streamsb.net", - "streamtape", - "terabox", - "teraboxapp", - "upload.ee", - "uptobox.com", - "upvid.cc", - "vshare.is", - "watchsb.com", - "we.tl", - "wetransfer.com", - "yadi.sk", - "zippyshare.com", -] - - -def is_share_link(url): - return bool( - match( - r"https?:\/\/.+\.gdtot\.\S+|https?:\/\/(filepress|filebee|appdrive|gdflix|driveseed)\.\S+", - url, - ) - ) - - -def get_readable_time(seconds): - result = "" - (days, remainder) = divmod(seconds, 86400) - days = int(days) - if days != 0: - result += f"{days}d" - (hours, remainder) = divmod(remainder, 3600) - hours = int(hours) - if hours != 0: - result += f"{hours}h" - (minutes, seconds) = divmod(remainder, 60) - minutes = int(minutes) - if minutes != 0: - result += f"{minutes}m" - seconds = int(seconds) - result += f"{seconds}s" - return result - - -fmed_list = [ - "fembed.net", - "fembed.com", - "femax20.com", - "fcdn.stream", - "feurl.com", - "layarkacaxxi.icu", - "naniplay.nanime.in", - "naniplay.nanime.biz", - "naniplay.com", - "mm9842.com", -] - -anonfilesBaseSites = [ - "anonfiles.com", - "hotfile.io", - "bayfiles.com", - "megaupload.nz", - "letsupload.cc", - "filechan.org", - "myfile.is", - "vshare.is", - "rapidshare.nu", - "lolabits.se", - "openload.cc", - "share-online.is", - "upvid.cc", -] - - -def direct_link_generator(link: str): - """direct links generator""" - domain = urlparse(link).hostname - if "yadi.sk" in domain or "disk.yandex.com" in domain: - return yandex_disk(link) - elif "mediafire.com" in domain: - return mediafire(link) - elif "uptobox.com" in domain: - return uptobox(link) - elif "osdn.net" in domain: - return osdn(link) - elif "github.com" in domain: - return github(link) - elif "hxfile.co" in domain: - return hxfile(link) - elif "1drv.ms" in domain: - return onedrive(link) - elif "pixeldrain.com" in domain: - return pixeldrain(link) - elif "antfiles.com" in domain: - return antfiles(link) - elif "streamtape" in domain: - return streamtape(link) - elif "racaty" in domain: - return racaty(link) - elif "1fichier.com" in domain: - return fichier(link) - elif "solidfiles.com" in domain: - return solidfiles(link) - elif "krakenfiles.com" in domain: - return krakenfiles(link) - elif "upload.ee" in domain: - return uploadee(link) - elif "akmfiles" in domain: - return akmfiles(link) - elif "linkbox" in domain: - return linkbox(link) - elif "shrdsk" in domain: - return shrdsk(link) - elif "letsupload.io" in domain: - return letsupload(link) - elif "zippyshare.com" in domain: - return zippyshare(link) - elif "mdisk.me" in domain: - return mdisk(link) - elif any(x in domain for x in ["wetransfer.com", "we.tl"]): - return wetransfer(link) - elif any(x in domain for x in anonfilesBaseSites): - return anonfilesBased(link) - elif any( - x in domain - for x in [ - "terabox", - "nephobox", - "4funbox", - "mirrobox", - "momerybox", - "teraboxapp", - ] - ): - return terabox(link) - elif any(x in domain for x in fmed_list): - return fembed(link) - elif any( - x in domain - for x in ["sbembed.com", "watchsb.com", "streamsb.net", "sbplay.org"] - ): - return sbembed(link) - elif is_share_link(link): - if "gdtot" in domain: - return gdtot(link) - elif "filepress" in domain: - return filepress(link) - else: - return sharer_scraper(link) - else: - return f"No Direct link function found for\n\n{link}\n\nuse /ddllist" - - -def mdisk(url): - header = { - "Accept": "*/*", - "Accept-Language": "en-US,en;q=0.5", - "Accept-Encoding": "gzip, deflate, br", - "Referer": "https://mdisk.me/", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36", - } - id = url.split("/")[-1] - URL = f"https://diskuploader.entertainvideo.com/v1/file/cdnurl?param={id}" - return get(url=URL, headers=header).json()["source"] - - -def yandex_disk(url: str) -> str: - """Yandex.Disk direct link generator - Based on https://github.com/wldhx/yadisk-direct""" - try: - link = findall(r"\b(https?://(yadi.sk|disk.yandex.com)\S+)", url)[0][0] - except IndexError: - return "No Yandex.Disk links found\n" - api = "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key={}" - cget = create_scraper().request - try: - return cget("get", api.format(link)).json()["href"] - except KeyError: - return "ERROR: File not found/Download limit reached" - - -def uptobox(url: str) -> str: - """Uptobox direct link generator - based on https://github.com/jovanzers/WinTenCermin and https://github.com/sinoobie/noobie-mirror - """ - try: - link = findall(r"\bhttps?://.*uptobox\.com\S+", url)[0] - except IndexError: - return "No Uptobox links found" - link = findall(r"\bhttps?://.*\.uptobox\.com/dl\S+", url) - if link: - return link[0] - cget = create_scraper().request - try: - file_id = findall(r"\bhttps?://.*uptobox\.com/(\w+)", url)[0] - if UPTOBOX_TOKEN: - file_link = f"https://uptobox.com/api/link?token={UPTOBOX_TOKEN}&file_code={file_id}" - else: - file_link = f"https://uptobox.com/api/link?file_code={file_id}" - res = cget("get", file_link).json() - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if res["statusCode"] == 0: - return res["data"]["dlLink"] - elif res["statusCode"] == 16: - sleep(1) - waiting_token = res["data"]["waitingToken"] - sleep(res["data"]["waiting"]) - elif res["statusCode"] == 39: - return f"ERROR: Uptobox is being limited please wait {get_readable_time(res['data']['waiting'])}" - else: - return f"ERROR: {res['message']}" - try: - res = cget("get", f"{file_link}&waitingToken={waiting_token}").json() - return res["data"]["dlLink"] - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - - -def mediafire(url: str) -> str: - final_link = findall(r"https?:\/\/download\d+\.mediafire\.com\/\S+\/\S+\/\S+", url) - if final_link: - return final_link[0] - cget = create_scraper().request - try: - url = cget("get", url).url - page = cget("get", url).text - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - final_link = findall( - r"\'(https?:\/\/download\d+\.mediafire\.com\/\S+\/\S+\/\S+)\'", page - ) - if not final_link: - return "ERROR: No links found in this page" - return final_link[0] - - -def osdn(url: str) -> str: - """OSDN direct link generator""" - osdn_link = "https://osdn.net" - try: - link = findall(r"\bhttps?://.*osdn\.net\S+", url)[0] - except IndexError: - return "No OSDN links found" - cget = create_scraper().request - try: - page = BeautifulSoup(cget("get", link, allow_redirects=True).content, "lxml") - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - info = page.find("a", {"class": "mirror_link"}) - link = unquote(osdn_link + info["href"]) - mirrors = page.find("form", {"id": "mirror-select-form"}).findAll("tr") - urls = [] - for data in mirrors[1:]: - mirror = data.find("input")["value"] - urls.append(sub(r"m=(.*)&f", f"m={mirror}&f", link)) - return urls[0] - - -def github(url: str) -> str: - """GitHub direct links generator""" - try: - findall(r"\bhttps?://.*github\.com.*releases\S+", url)[0] - except IndexError: - return "No GitHub Releases links found" - cget = create_scraper().request - download = cget("get", url, stream=True, allow_redirects=False) - try: - return download.headers["location"] - except KeyError: - return "ERROR: Can't extract the link" - - -def hxfile(url: str) -> str: - sess = session() - try: - headers = { - "content-type": "application/x-www-form-urlencoded", - "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Safari/537.36", - } - - data = { - "op": "download2", - "id": urlparse(url).path.strip("/")(url), - "rand": "", - "referer": "", - "method_free": "", - "method_premium": "", - } - - response = sess.post(url, headers=headers, data=data) - soup = BeautifulSoup(response, "html.parser") - - if btn := soup.find(class_="btn btn-dow"): - return btn["href"] - if unique := soup.find(id="uniqueExpirylink"): - return unique["href"] - - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - - -def letsupload(url: str) -> str: - cget = create_scraper().request - try: - res = cget("POST", url) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - direct_link = findall(r"(https?://letsupload\.io\/.+?)\'", res.text) - if direct_link: - return direct_link[0] - else: - return "ERROR: Direct Link not found" - - -def anonfilesBased(url: str) -> str: - cget = create_scraper().request - try: - soup = BeautifulSoup(cget("get", url).content, "lxml") - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - sa = soup.find(id="download-url") - if sa: - return sa["href"] - return "ERROR: File not found!" - - -def fembed(link: str) -> str: - sess = session() - try: - url = url.replace("/v/", "/f/") - raw = session.get(url) - api = search(r"(/api/source/[^\"']+)", raw.text) - if api is not None: - result = {} - raw = sess.post("https://layarkacaxxi.icu" + api.group(1)).json() - for d in raw["data"]: - f = d["file"] - head = sess.head(f) - direct = head.headers.get("Location", url) - result[f"{d['label']}/{d['type']}"] = direct - dl_url = result - - count = len(dl_url) - lst_link = [dl_url[i] for i in dl_url] - return lst_link[count - 1] - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - - -def sbembed(link: str) -> str: - sess = session() - try: - raw = sess.get(link) - soup = BeautifulSoup(raw, "html.parser") - - result = {} - for a in soup.findAll("a", onclick=compile(r"^download_video[^>]+")): - data = dict( - zip( - ["id", "mode", "hash"], - findall(r"[\"']([^\"']+)[\"']", a["onclick"]), - ) - ) - data["op"] = "download_orig" - - raw = sess.get("https://sbembed.com/dl", params=data) - soup = BeautifulSoup(raw, "html.parser") - - if direct := soup.find("a", text=compile("(?i)^direct")): - result[a.text] = direct["href"] - dl_url = result - - count = len(dl_url) - lst_link = [dl_url[i] for i in dl_url] - return lst_link[count - 1] - - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - - -def onedrive(link: str) -> str: - """Onedrive direct link generator - Based on https://github.com/UsergeTeam/Userge""" - link_without_query = urlparse(link)._replace(query=None).geturl() - direct_link_encoded = str( - standard_b64encode(bytes(link_without_query, "utf-8")), "utf-8" - ) - direct_link1 = ( - f"https://api.onedrive.com/v1.0/shares/u!{direct_link_encoded}/root/content" - ) - cget = create_scraper().request - try: - resp = cget("head", direct_link1) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if resp.status_code != 302: - return "ERROR: Unauthorized link, the link may be private" - return resp.next.url - - -def pixeldrain(url: str) -> str: - """Based on https://github.com/yash-dk/TorToolkit-Telegram""" - url = url.strip("/ ") - file_id = url.split("/")[-1] - if url.split("/")[-2] == "l": - info_link = f"https://pixeldrain.com/api/list/{file_id}" - dl_link = f"https://pixeldrain.com/api/list/{file_id}/zip?download" - else: - info_link = f"https://pixeldrain.com/api/file/{file_id}/info" - dl_link = f"https://pixeldrain.com/api/file/{file_id}?download" - cget = create_scraper().request - try: - resp = cget("get", info_link).json() - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if resp["success"]: - return dl_link - else: - return f"ERROR: Cant't download due {resp['message']}." - - -def antfiles(url: str) -> str: - sess = session() - try: - raw = sess.get(url) - soup = BeautifulSoup(raw, "html.parser") - - if a := soup.find(class_="main-btn", href=True): - return "{0.scheme}://{0.netloc}/{1}".format(urlparse(url), a["href"]) - - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - - -def streamtape(url: str) -> str: - response = get(url) - - if videolink := findall(r"document.*((?=id\=)[^\"']+)", response.text): - nexturl = "https://streamtape.com/get_video?" + videolink[-1] - try: - return nexturl - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - - -def racaty(url: str) -> str: - """Racaty direct link generator - By https://github.com/junedkh""" - cget = create_scraper().request - try: - url = cget("GET", url).url - json_data = {"op": "download2", "id": url.split("/")[-1]} - res = cget("POST", url, data=json_data) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - html_tree = etree.HTML(res.text) - direct_link = html_tree.xpath("//a[contains(@id,'uniqueExpirylink')]/@href") - if direct_link: - return direct_link[0] - else: - return "ERROR: Direct link not found" - - -def fichier(link: str) -> str: - """1Fichier direct link generator - Based on https://github.com/Maujar - """ - regex = r"^([http:\/\/|https:\/\/]+)?.*1fichier\.com\/\?.+" - gan = match(regex, link) - if not gan: - return "ERROR: The link you entered is wrong!" - if "::" in link: - pswd = link.split("::")[-1] - url = link.split("::")[-2] - else: - pswd = None - url = link - cget = create_scraper().request - try: - if pswd is None: - req = cget("post", url) - else: - pw = {"pass": pswd} - req = cget("post", url, data=pw) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if req.status_code == 404: - return "ERROR: File not found/The link you entered is wrong!" - soup = BeautifulSoup(req.content, "lxml") - if soup.find("a", {"class": "ok btn-general btn-orange"}): - dl_url = soup.find("a", {"class": "ok btn-general btn-orange"})["href"] - if dl_url: - return dl_url - return "ERROR: Unable to generate Direct Link 1fichier!" - elif len(soup.find_all("div", {"class": "ct_warn"})) == 3: - str_2 = soup.find_all("div", {"class": "ct_warn"})[-1] - if "you must wait" in str(str_2).lower(): - numbers = [int(word) for word in str(str_2).split() if word.isdigit()] - if numbers: - return ( - f"ERROR: 1fichier is on a limit. Please wait {numbers[0]} minute." - ) - else: - return "ERROR: 1fichier is on a limit. Please wait a few minutes/hour." - elif "protect access" in str(str_2).lower(): - return "ERROR: This link requires a password!\n\nThis link requires a password!\n- Insert sign :: after the link and write the password after the sign.\n\nExample: https://1fichier.com/?smmtd8twfpm66awbqz04::love you\n\n* No spaces between the signs ::\n* For the password, you can use a space!" - else: - return "ERROR: Failed to generate Direct Link from 1fichier!" - elif len(soup.find_all("div", {"class": "ct_warn"})) == 4: - str_1 = soup.find_all("div", {"class": "ct_warn"})[-2] - str_3 = soup.find_all("div", {"class": "ct_warn"})[-1] - if "you must wait" in str(str_1).lower(): - numbers = [int(word) for word in str(str_1).split() if word.isdigit()] - if numbers: - return ( - f"ERROR: 1fichier is on a limit. Please wait {numbers[0]} minute." - ) - else: - return "ERROR: 1fichier is on a limit. Please wait a few minutes/hour." - elif "bad password" in str(str_3).lower(): - return "ERROR: The password you entered is wrong!" - else: - return "ERROR: Error trying to generate Direct Link from 1fichier!" - else: - return "ERROR: Error trying to generate Direct Link from 1fichier!" - - -def solidfiles(url: str) -> str: - """Solidfiles direct link generator - Based on https://github.com/Xonshiz/SolidFiles-Downloader - By https://github.com/Jusidama18""" - cget = create_scraper().request - try: - headers = { - "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36" - } - pageSource = cget("get", url, headers=headers).text - mainOptions = str(search(r"viewerOptions\'\,\ (.*?)\)\;", pageSource).group(1)) - return loads(mainOptions)["downloadUrl"] - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - - -def krakenfiles(url: str) -> str: - sess = session() - try: - res = sess.get(url) - html = etree.HTML(res.text) - if post_url := html.xpath('//form[@id="dl-form"]/@action'): - post_url = f"https:{post_url[0]}" - else: - sess.close() - return "ERROR: Unable to find post link." - if token := html.xpath('//input[@id="dl-token"]/@value'): - data = {"token": token[0]} - else: - sess.close() - return "ERROR: Unable to find token for post." - except Exception as e: - sess.close() - return f"ERROR: {e.__class__.__name__} Something went wrong" - try: - dl_link = sess.post(post_url, data=data).json() - return dl_link["url"] - except Exception as e: - sess.close() - return f"ERROR: {e.__class__.__name__} While send post request" - - -def uploadee(url: str) -> str: - """uploadee direct link generator - By https://github.com/iron-heart-x""" - cget = create_scraper().request - try: - soup = BeautifulSoup(cget("get", url).content, "lxml") - sa = soup.find("a", attrs={"id": "d_l"}) - return sa["href"] - except: - return f"ERROR: Failed to acquire download URL from upload.ee for : {url}" - - -def terabox(url) -> str: - sess = session() - while True: - try: - res = sess.get(url) - print("connected") - break - except: - print("retrying") - url = res.url - - key = url.split("?surl=")[-1] - url = f"http://www.terabox.com/wap/share/filelist?surl={key}" - sess.cookies.update(TERA_COOKIE) - - while True: - try: - res = sess.get(url) - print("connected") - break - except Exception as e: - print("retrying") - - key = res.url.split("?surl=")[-1] - soup = BeautifulSoup(res.content, "lxml") - jsToken = None - - for fs in soup.find_all("script"): - fstring = fs.string - if fstring and fstring.startswith("try {eval(decodeURIComponent"): - jsToken = fstring.split("%22")[1] - - while True: - try: - res = sess.get( - f"https://www.terabox.com/share/list?app_id=250528&jsToken={jsToken}&shorturl={key}&root=1" - ) - print("connected") - break - except: - print("retrying") - result = res.json() - - if result["errno"] != 0: - return f"ERROR: '{result['errmsg']}' Check cookies" - result = result["list"] - if len(result) > 1: - return "ERROR: Can't download mutiple files" - result = result[0] - - if result["isdir"] != "0": - return "ERROR: Can't download folder" - return result.get("dlink", "Error") - - -def filepress(url): - cget = create_scraper().request - try: - url = cget("GET", url).url - raw = urlparse(url) - - gd_data = { - "id": raw.path.split("/")[-1], - "method": "publicDownlaod", - } - tg_data = { - "id": raw.path.split("/")[-1], - "method": "telegramDownload", - } - - api = f"{raw.scheme}://{raw.hostname}/api/file/downlaod/" - - gd_res = cget( - "POST", - api, - headers={"Referer": f"{raw.scheme}://{raw.hostname}"}, - json=gd_data, - ).json() - tg_res = cget( - "POST", - api, - headers={"Referer": f"{raw.scheme}://{raw.hostname}"}, - json=tg_data, - ).json() - - except Exception as e: - return f"Google Drive: ERROR: {e.__class__.__name__} \nTelegram: ERROR: {e.__class__.__name__}" - - gd_result = ( - f'https://drive.google.com/uc?id={gd_res["data"]}' - if "data" in gd_res - else f'ERROR: {gd_res["statusText"]}' - ) - tg_result = ( - f'https://tghub.xyz/?start={tg_res["data"]}' - if "data" in tg_res - else "No Telegram file available " - ) - - return f"Google Drive: {gd_result} \nTelegram: {tg_result}" - - -def gdtot(url): - cget = create_scraper().request - try: - res = cget("GET", f'https://gdbot.xyz/file/{url.split("/")[-1]}') - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - token_url = etree.HTML(res.content).xpath( - "//a[contains(@class,'inline-flex items-center justify-center')]/@href" - ) - if not token_url: - try: - url = cget("GET", url).url - p_url = urlparse(url) - res = cget( - "GET", f"{p_url.scheme}://{p_url.hostname}/ddl/{url.split('/')[-1]}" - ) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - drive_link = findall(r"myDl\('(.*?)'\)", res.text) - if drive_link and "drive.google.com" in drive_link[0]: - return drive_link[0] - else: - return "ERROR: Drive Link not found, Try in your broswer" - token_url = token_url[0] - try: - token_page = cget("GET", token_url) - except Exception as e: - return f"ERROR: {e.__class__.__name__} with {token_url}" - path = findall('\("(.*?)"\)', token_page.text) - if not path: - return "ERROR: Cannot bypass this" - path = path[0] - raw = urlparse(token_url) - final_url = f"{raw.scheme}://{raw.hostname}{path}" - return sharer_scraper(final_url) - - -def sharer_scraper(url): - cget = create_scraper().request - try: - url = cget("GET", url).url - raw = urlparse(url) - header = { - "useragent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/7.0.548.0 Safari/534.10" - } - res = cget("GET", url, headers=header) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - key = findall('"key",\s+"(.*?)"', res.text) - if not key: - return "ERROR: Key not found!" - key = key[0] - if not etree.HTML(res.content).xpath("//button[@id='drc']"): - return "ERROR: This link don't have direct download button" - boundary = uuid4() - headers = { - "Content-Type": f"multipart/form-data; boundary=----WebKitFormBoundary{boundary}", - "x-token": raw.hostname, - "useragent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/7.0.548.0 Safari/534.10", - } - - data = ( - f'------WebKitFormBoundary{boundary}\r\nContent-Disposition: form-data; name="action"\r\n\r\ndirect\r\n' - f'------WebKitFormBoundary{boundary}\r\nContent-Disposition: form-data; name="key"\r\n\r\n{key}\r\n' - f'------WebKitFormBoundary{boundary}\r\nContent-Disposition: form-data; name="action_token"\r\n\r\n\r\n' - f"------WebKitFormBoundary{boundary}--\r\n" - ) - try: - res = cget("POST", url, cookies=res.cookies, headers=headers, data=data).json() - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if "url" not in res: - return "ERROR: Drive Link not found, Try in your broswer" - if "drive.google.com" in res["url"]: - return res["url"] - try: - res = cget("GET", res["url"]) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - html_tree = etree.HTML(res.content) - drive_link = html_tree.xpath("//a[contains(@class,'btn')]/@href") - if drive_link and "drive.google.com" in drive_link[0]: - return drive_link[0] - else: - return "ERROR: Drive Link not found, Try in your broswer" - - -def wetransfer(url): - cget = create_scraper().request - try: - url = cget("GET", url).url - json_data = {"security_hash": url.split("/")[-1], "intent": "entire_transfer"} - res = cget( - "POST", - f'https://wetransfer.com/api/v4/transfers/{url.split("/")[-2]}/download', - json=json_data, - ).json() - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if "direct_link" in res: - return res["direct_link"] - elif "message" in res: - return f"ERROR: {res['message']}" - elif "error" in res: - return f"ERROR: {res['error']}" - else: - return "ERROR: cannot find direct link" - - -def akmfiles(url): - cget = create_scraper().request - try: - url = cget("GET", url).url - json_data = {"op": "download2", "id": url.split("/")[-1]} - res = cget("POST", url, data=json_data) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - html_tree = etree.HTML(res.content) - direct_link = html_tree.xpath("//a[contains(@class,'btn btn-dow')]/@href") - if direct_link: - return direct_link[0] - else: - return "ERROR: Direct link not found" - - -def shrdsk(url): - cget = create_scraper().request - try: - url = cget("GET", url).url - res = cget( - "GET", - f'https://us-central1-affiliate2apk.cloudfunctions.net/get_data?shortid={url.split("/")[-1]}', - ) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if res.status_code != 200: - return f"ERROR: Status Code {res.status_code}" - res = res.json() - if "type" in res and res["type"].lower() == "upload" and "video_url" in res: - return res["video_url"] - return "ERROR: cannot find direct link" - - -def linkbox(url): - cget = create_scraper().request - try: - url = cget("GET", url).url - res = cget( - "GET", f'https://www.linkbox.to/api/file/detail?itemId={url.split("/")[-1]}' - ).json() - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if "data" not in res: - return "ERROR: Data not found!!" - data = res["data"] - if not data: - return "ERROR: Data is None!!" - if "itemInfo" not in data: - return "ERROR: itemInfo not found!!" - itemInfo = data["itemInfo"] - if "url" not in itemInfo: - return "ERROR: url not found in itemInfo!!" - if "name" not in itemInfo: - return "ERROR: Name not found in itemInfo!!" - name = quote(itemInfo["name"]) - raw = itemInfo["url"].split("/", 3)[-1] - return f"https://wdl.nuplink.net/{raw}&filename={name}" - - -def zippyshare(url): - cget = create_scraper().request - try: - url = cget("GET", url).url - resp = cget("GET", url) - except Exception as e: - return f"ERROR: {e.__class__.__name__}" - if not resp.ok: - return "ERROR: Something went wrong!!, Try in your browser" - if findall(r">File does not exist on this server<", resp.text): - return "ERROR: File does not exist on server!!, Try in your browser" - pages = etree.HTML(resp.text).xpath( - "//script[contains(text(),'dlbutton')][3]/text()" - ) - if not pages: - return "ERROR: Page not found!!" - js_script = pages[0] - uri1 = None - uri2 = None - method = "" - omg = findall(r"\.omg.=.(.*?);", js_script) - var_a = findall(r"var.a.=.(\d+)", js_script) - var_ab = findall(r"var.[ab].=.(\d+)", js_script) - unknown = findall(r"\+\((.*?).\+", js_script) - unknown1 = findall(r"\+.\((.*?)\).\+", js_script) - if omg: - omg = omg[0] - method = f"omg = {omg}" - mtk = (eval(omg) * (int(omg.split("%")[0]) % 3)) + 18 - uri1 = findall(r'"/(d/\S+)/"', js_script) - uri2 = findall(r'\/d.*?\+"/(\S+)";', js_script) - elif var_a: - var_a = var_a[0] - method = f"var_a = {var_a}" - mtk = int(pow(int(var_a), 3) + 3) - uri1 = findall(r"\.href.=.\"/(.*?)/\"", js_script) - uri2 = findall(r"\+\"/(.*?)\"", js_script) - elif var_ab: - a = var_ab[0] - b = var_ab[1] - method = f"a = {a}, b = {b}" - mtk = eval(f"{floor(int(a)/3) + int(a) % int(b)}") - uri1 = findall(r"\.href.=.\"/(.*?)/\"", js_script) - uri2 = findall(r"\)\+\"/(.*?)\"", js_script) - elif unknown: - method = f"unknown = {unknown[0]}" - mtk = eval(f"{unknown[0]}+ 11") - uri1 = findall(r"\.href.=.\"/(.*?)/\"", js_script) - uri2 = findall(r"\)\+\"/(.*?)\"", js_script) - elif unknown1: - method = f"unknown1 = {unknown1[0]}" - mtk = eval(unknown1[0]) - uri1 = findall(r"\.href.=.\"/(.*?)/\"", js_script) - uri2 = findall(r"\+.\"/(.*?)\"", js_script) - else: - return "ERROR: Direct link not found" - if not any([uri1, uri2]): - return f"ERROR: uri1 or uri2 not found with method {method}" - domain = urlparse(url).hostname - return f"https://{domain}/{uri1[0]}/{mtk}/{uri2[0]}" diff --git a/freewall.py b/freewall.py deleted file mode 100644 index eadef4f0..00000000 --- a/freewall.py +++ /dev/null @@ -1,123 +0,0 @@ -import requests -import base64 -import re -from bs4 import BeautifulSoup -from bypasser import RecaptchaV3 - -RTOKEN = RecaptchaV3() - -####################################################################### - - -def getSoup(res): - return BeautifulSoup(res.text, "html.parser") - - -def downloaderla(url, site): - params = { - "url": url, - "token": RTOKEN, - } - return requests.get(site, params=params).json() - - -def getImg(url): - return requests.get(url).content - - -def decrypt(res, key): - if res["success"]: - return base64.b64decode(res["result"].split(key)[-1]).decode("utf-8") - - -####################################################################### - - -def shutterstock(url): - res = downloaderla(url, "https://ttthreads.net/shutterstock.php") - if res["success"]: - return res["result"] - - -def adobestock(url): - res = downloaderla(url, "https://new.downloader.la/adobe.php") - return decrypt(res, "#") - - -def alamy(url): - res = downloaderla(url, "https://new.downloader.la/alamy.php") - return decrypt(res, "#") - - -def getty(url): - res = downloaderla(url, "https://getpaidstock.com/api.php") - return decrypt(res, "#") - - -def picfair(url): - res = downloaderla(url, "https://downloader.la/picf.php") - return decrypt(res, "?newURL=") - - -def slideshare(url, type="pptx"): - # enum = {"pdf","pptx","img"} - # if type not in enum: type = "pdf" - return requests.get( - f"https://downloader.at/convert2{type}.php", params={"url": url} - ).content - - -def medium(url): - return requests.post( - "https://downloader.la/read.php", - data={ - "mediumlink": url, - }, - ).content - - -####################################################################### - - -def pass_paywall(url, check=False, link=False): - patterns = [ - (r"https?://(?:www\.)?shutterstock\.com/", shutterstock, True, "png", -1), - (r"https?://stock\.adobe\.com/", adobestock, True, "png", -2), - (r"https?://(?:www\.)?alamy\.com/", alamy, True, "png", -1), - (r"https?://(?:www\.)?gettyimages\.", getty, True, "png", -2), - (r"https?://(?:www\.)?istockphoto\.com", getty, True, "png", -1), - (r"https?://(?:www\.)?picfair\.com/", picfair, True, "png", -1), - (r"https?://(?:www\.)?slideshare\.net/", slideshare, False, "pptx", -1), - (r"https?://medium\.com/", medium, False, "html", -1), - ] - - img_link = None - name = "no-name" - for pattern, downloader_func, img, ftype, idx in patterns: - if re.search(pattern, url): - if check: - return True - img_link = downloader_func(url) - - try: - name = url.split("/")[idx] - except: - pass - if (not img) and img_link: - fullname = name + "." + ftype - with open(fullname, "wb") as f: - f.write(img_link) - return fullname - break - - if check: - return False - if link or (not img_link): - return img_link - fullname = name + "." + "png" - with open(fullname, "wb") as f: - f.write(getImg(img_link)) - return fullname - - -####################################################################### diff --git a/main.py b/main.py deleted file mode 100644 index b9f4a21d..00000000 --- a/main.py +++ /dev/null @@ -1,300 +0,0 @@ -from pyrogram import Client, filters -from pyrogram.types import ( - InlineKeyboardMarkup, - InlineKeyboardButton, - BotCommand, - Message, -) -from os import environ, remove -from threading import Thread -from json import load -from re import search -import re -from urlextract import URLExtract -from texts import HELP_TEXT -import bypasser -import freewall -from time import time -from db import DB - -# Initialize URL extractor -extractor = URLExtract() - -# Bot configuration -with open("config.json", "r") as f: - DATA: dict = load(f) - -def getenv(var): - return environ.get(var) or DATA.get(var, None) - -bot_token = getenv("TOKEN") -api_hash = getenv("HASH") -api_id = getenv("ID") -app = Client("my_bot", api_id=api_id, api_hash=api_hash, bot_token=bot_token) -with app: - app.set_bot_commands( - [ - BotCommand("start", "Welcome Message"), - BotCommand("help", "List of All Supported Sites"), - ] - ) - -# Database setup -db_api = getenv("DB_API") -db_owner = getenv("DB_OWNER") -db_name = getenv("DB_NAME") -try: - database = DB(api_key=db_api, db_owner=db_owner, db_name=db_name) -except: - print("Database is Not Set") - database = None - -# Handle index -def handleIndex(ele: str, message: Message, msg: Message): - result = bypasser.scrapeIndex(ele) - try: - app.delete_messages(message.chat.id, msg.id) - except: - pass - if database and result: - database.insert(ele, result) - for page in result: - app.send_message( - message.chat.id, - page, - reply_to_message_id=message.id, - disable_web_page_preview=True, - ) - -# URL regex pattern -URL_REGEX = r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+' - -# Updated loopthread function -def loopthread(message: Message, otherss=False): - urls = [] - # Use message.caption for media (otherss=True), message.text for text messages (otherss=False) - if otherss: - texts = message.caption or "" - else: - texts = message.text or "" - - # Check entities based on message type - entities = [] - if otherss and hasattr(message, 'caption_entities') and message.caption_entities: - entities = message.caption_entities - elif message.entities: - entities = message.entities - - # Step 1: Extract URLs from entities - if entities: - for entity in entities: - entity_type = str(entity.type) - normalized_type = entity_type.split('.')[-1].lower() if '.' in entity_type else entity_type.lower() - - if normalized_type == "url": - url = texts[entity.offset:entity.offset + entity.length] - urls.append(url) - elif normalized_type == "text_link": - if hasattr(entity, 'url') and entity.url: - urls.append(entity.url) - - # Step 2: Fallback to text-based URL extraction - extracted_urls = extractor.find_urls(texts) - urls.extend(extracted_urls) - regex_urls = re.findall(URL_REGEX, texts) - urls.extend(regex_urls) - - # Step 3: Clean and deduplicate URLs - cleaned_urls = [] - for url in urls: - cleaned_url = url.strip(".,").rstrip("/") - if cleaned_url: - cleaned_urls.append(cleaned_url) - urls = list(dict.fromkeys(cleaned_urls)) # Preserve order, remove duplicates - if not urls: - app.send_message( - message.chat.id, - "No valid URLs found in the message.", - reply_to_message_id=message.id - ) - return - - # Step 4: Normalize URLs (add protocol if missing) - normalized_urls = [] - for url in urls: - if not url.startswith(('http://', 'https://')): - url = 'https://' + url - normalized_urls.append(url) - urls = normalized_urls - - # Bypassing logic - if bypasser.ispresent(bypasser.ddl.ddllist, urls[0]): - msg: Message = app.send_message( - message.chat.id, "⚡ __generating...__", reply_to_message_id=message.id - ) - elif freewall.pass_paywall(urls[0], check=True): - msg: Message = app.send_message( - message.chat.id, "🕴️ __jumping the wall...__", reply_to_message_id=message.id - ) - else: - if "https://olamovies" in urls[0] or "https://psa.wf/" in urls[0]: - msg: Message = app.send_message( - message.chat.id, - "⏳ __this might take some time...__", - reply_to_message_id=message.id, - ) - else: - msg: Message = app.send_message( - message.chat.id, "🔎 __bypassing...__", reply_to_message_id=message.id - ) - - strt = time() - links = "" - temp = None - - for ele in urls: - if database: - df_find = database.find(ele) - else: - df_find = None - if df_find: - print("Found in DB") - temp = df_find - elif search(r"https?:\/\/(?:[\w.-]+)?\.\w+\/\d+:", ele): - handleIndex(ele, message, msg) - return - elif bypasser.ispresent(bypasser.ddl.ddllist, ele): - try: - temp = bypasser.ddl.direct_link_generator(ele) - except Exception as e: - temp = "**Error**: " + str(e) - elif freewall.pass_paywall(ele, check=True): - freefile = freewall.pass_paywall(ele) - if freefile: - try: - app.send_document( - message.chat.id, freefile, reply_to_message_id=message.id - ) - remove(freefile) - app.delete_messages(message.chat.id, [msg.id]) - return - except: - pass - else: - app.send_message( - message.chat.id, "__Failed to Jump", reply_to_message_id=message.id - ) - else: - try: - temp = bypasser.shortners(ele) - except Exception as e: - temp = "**Error**: " + str(e) - - print("bypassed:", temp) - if temp is not None: - if (not df_find) and ("http://" in temp or "https://" in temp) and database: - print("Adding to DB") - database.insert(ele, temp) - links = links + temp + "\n" - - end = time() - print("Took " + "{:.2f}".format(end - strt) + "sec") - - # Send bypassed links - try: - final = [] - tmp = "" - for ele in links.split("\n"): - tmp += ele + "\n" - if len(tmp) > 4000: - final.append(tmp) - tmp = "" - final.append(tmp) - app.delete_messages(message.chat.id, msg.id) - tmsgid = message.id - for ele in final: - tmsg = app.send_message( - message.chat.id, - f"__{ele}__", - reply_to_message_id=tmsgid, - disable_web_page_preview=True, - ) - tmsgid = tmsg.id - except Exception as e: - app.send_message( - message.chat.id, - f"__Failed to Bypass : {e}__", - reply_to_message_id=message.id, - ) - -# Start command -@app.on_message(filters.command(["start"])) -def send_start(client: Client, message: Message): - app.send_message( - message.chat.id, - f"__👋 Hi **{message.from_user.mention}**, I am Link Bypasser Bot, just send me any supported links and I will get you results.\nCheckout /help to Read More__", - reply_markup=InlineKeyboardMarkup( - [ - [ - InlineKeyboardButton( - "🌐 Source Code", - url="https://github.com/bipinkrish/Link-Bypasser-Bot", - ) - ], - [ - InlineKeyboardButton( - "Replit", - url="https://replit.com/@bipinkrish/Link-Bypasser#app.py", - ) - ], - ] - ), - reply_to_message_id=message.id, - ) - -# Help command -@app.on_message(filters.command(["help"])) -def send_help(client: Client, message: Message): - app.send_message( - message.chat.id, - HELP_TEXT, - reply_to_message_id=message.id, - disable_web_page_preview=True, - ) - -# Text message handler -@app.on_message(filters.text) -def receive(client: Client, message: Message): - bypass = Thread(target=lambda: loopthread(message), daemon=True) - bypass.start() - -# Document thread for DLC files -def docthread(message: Message): - msg: Message = app.send_message( - message.chat.id, "🔎 __bypassing...__", reply_to_message_id=message.id - ) - print("sent DLC file") - file = app.download_media(message) - dlccont = open(file, "r").read() - links = bypasser.getlinks(dlccont) - app.edit_message_text( - message.chat.id, msg.id, f"__{links}__", disable_web_page_preview=True - ) - remove(file) - -# Media file handler -@app.on_message([filters.document, filters.photo, filters.video]) -def docfile(client: Client, message: Message): - try: - if message.document and message.document.file_name.endswith("dlc"): - bypass = Thread(target=lambda: docthread(message), daemon=True) - bypass.start() - return - except: - pass - bypass = Thread(target=lambda: loopthread(message, True), daemon=True) - bypass.start() - -# Start the bot -print("Bot Starting") -app.run() diff --git a/requirements.txt b/requirements.txt index e73b9b81..42d7ed82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,3 +11,4 @@ flask gunicorn curl-cffi urlextract +pymongo \ No newline at end of file diff --git a/runtime.txt b/runtime.txt index 195aae5f..25fd1e59 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.9.14 +python-3.9.14 \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/app.py b/src/app.py new file mode 100644 index 00000000..f35e9286 --- /dev/null +++ b/src/app.py @@ -0,0 +1,171 @@ +from flask import Flask, request, render_template, make_response, send_file +import re +import os +import sys + +# Add src to path for imports +sys.path.append(os.path.join(os.path.dirname(__file__), 'src')) + +# Import new simple config system +from config import CONFIG_LIST, get_function_by_url + +app = Flask(__name__) + +def get_bypasser_type(url): + """Determine bypasser type for a URL""" + for config in CONFIG_LIST: + if re.search(config['url_regex'], url, re.IGNORECASE): + return config['type'] + return 'bypasser' # default + +def loop_thread(url): + """Main processing function for URLs""" + if not url: + return None + + try: + # Get the appropriate function for this URL + func = get_function_by_url(url) + if func: + result = func(url) + else: + return "No handler found for this URL" + + # Handle file download for freewall sites + if get_bypasser_type(url) == 'freewall' and result and os.path.exists(result): + try: + return send_file(result) + except: + pass + + if result: + return str(result) + else: + return "Unable to bypass this URL" + + except Exception as e: + return f"**Error**: {str(e)}" + +@app.route("/", methods=["GET", "POST"]) +def home(): + # Get site data for template + from config import get_all_site_names + sites = get_all_site_names() + + bypasser_sites = sorted(sites.get('bypasser', [])) + ddl_sites = sorted(sites.get('ddl', [])) + freewall_sites = sorted(sites.get('freewall', [])) + + result = None + + if request.method == "POST": + url = request.form.get("url") + if url: + result = loop_thread(url) + + return render_template("index.html", + bypasser_sites=bypasser_sites, + ddl_sites=ddl_sites, + freewall_sites=freewall_sites, + result=result) + +@app.route("/bypass", methods=["GET", "POST"]) +def short(): + if request.method == "POST": + url = request.form.get("url") + resp = make_response(loop_thread(url)) + resp.headers["Content-Type"] = "text/plain; charset=utf-8" + return resp + elif request.method == "GET": + url = request.args.get("url") + resp = make_response(loop_thread(url)) + resp.headers["Content-Type"] = "text/plain; charset=utf-8" + return resp + +@app.route("/api/bypass") +def short_api(): + """API endpoint for URL bypassing""" + url = request.args.get("url") + try: + result = loop_thread(url) + return { + "success": True, + "result": result, + "message": "Successfully bypassed" + } + except Exception as e: + return { + "success": False, + "result": None, + "message": str(e) + } + +@app.route("/supported") +def supported_sites(): + """Return list of supported sites""" + supported = { + 'bypasser': [], + 'ddl': [], + 'freewall': [] + } + + for config in CONFIG_LIST: + # Extract domain from regex for display + domain_match = re.search(r'([a-zA-Z0-9-]+\.[a-zA-Z]{2,})', config['url_regex']) + domain = domain_match.group(1) if domain_match else config['url_regex'] + + site_info = { + 'domain': domain, + 'regex': config['url_regex'], + 'function': config['callback_function'].__name__ if callable(config['callback_function']) else str(config['callback_function']) + } + + if config['type'] in supported: + supported[config['type']].append(site_info) + + return { + "success": True, + "supported_sites": supported, + "total_configs": len(CONFIG_LIST) + } + +@app.route("/health") +def health_check(): + """Health check endpoint""" + return { + "status": "healthy", + "total_configs": len(CONFIG_LIST), + "bypasser_types": ["bypasser", "ddl", "freewall"] + } + +@app.route("/config") +def show_config(): + """Show current configuration (for debugging)""" + config_info = [] + for i, config in enumerate(CONFIG_LIST): + config_info.append({ + "id": i, + "type": config['type'], + "regex": config['url_regex'], + "function": config['callback_function'].__name__ if callable(config['callback_function']) else str(config['callback_function']) + }) + + return { + "success": True, + "configs": config_info, + "total": len(CONFIG_LIST) + } + +if __name__ == "__main__": + print("🚀 Starting Flask app with new configuration system...") + print(f"📋 Loaded {len(CONFIG_LIST)} bypasser configurations") + + # Show summary of config types + type_counts = {} + for config in CONFIG_LIST: + type_counts[config['type']] = type_counts.get(config['type'], 0) + 1 + + for bypass_type, count in type_counts.items(): + print(f" {bypass_type}: {count} sites") + + app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000)), debug=False) diff --git a/src/bot_core.py b/src/bot_core.py new file mode 100644 index 00000000..6c2d6434 --- /dev/null +++ b/src/bot_core.py @@ -0,0 +1,370 @@ +""" +Core Bot Logic - Cleaned up and organized +""" + +from pyrogram import Client, filters +from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message +from threading import Thread +from time import time +import re +from urlextract import URLExtract +from os import remove + +# Import config and utilities +from config import CONFIG_LIST, process_url, is_ddl_url, is_freewall_url, is_index_url +from src.core.texts import HELP_TEXT +from src.core.db import DB + +class BotCore: + def __init__(self, app_client, database=None): + self.app = app_client + self.database = database + self.extractor = URLExtract() + self.URL_REGEX = r'(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+' + + def setup_handlers(self): + """Setup all message handlers""" + + @self.app.on_message(filters.command(["start"])) + def send_start(client, message): + self.handle_start(message) + + @self.app.on_message(filters.command(["help"])) + def send_help(client, message): + self.handle_help(message) + + @self.app.on_message(filters.command(["config"])) + def send_config(client, message): + self.handle_config_command(message) + + @self.app.on_callback_query() + def handle_callback(client, callback_query): + self.handle_callback_query(callback_query) + + @self.app.on_message(filters.text) + def receive(client, message): + self.handle_text_message(message) + + @self.app.on_message([filters.document, filters.photo, filters.video]) + def docfile(client, message): + self.handle_media_message(message) + + def handle_start(self, message): + """Handle /start command""" + self.app.send_message( + message.chat.id, + f"__👋 Hi **{message.from_user.mention}**, I am Link Bypasser Bot v2.0, send me any supported links and I will get you results.\nCheckout /help to Read More__", + reply_markup=InlineKeyboardMarkup([ + [InlineKeyboardButton("🌐 Source Code", url="https://github.com/bipinkrish/Link-Bypasser-Bot")], + [InlineKeyboardButton("🔗 Supported Sites", callback_data="supported_sites")], + ]), + reply_to_message_id=message.id, + ) + + def handle_help(self, message): + """Handle /help command""" + self.app.send_message( + message.chat.id, + HELP_TEXT, + reply_to_message_id=message.id, + disable_web_page_preview=True, + ) + + def handle_config_command(self, message): + """Handle /config command""" + # Group configs by type + config_groups = {} + for config in CONFIG_LIST: + config_type = config["type"] + if config_type not in config_groups: + config_groups[config_type] = [] + config_groups[config_type].append(config) + + config_text = "**🔧 Current Configuration:**\n\n" + for config_type, configs in config_groups.items(): + config_text += f"**{config_type.upper()}** ({len(configs)} sites)\n" + for i, config in enumerate(configs[:5], 1): + config_text += f"`{i}.` {config['description']}\n" + if len(configs) > 5: + config_text += f"... and {len(configs) - 5} more\n" + config_text += "\n" + + self.app.send_message(message.chat.id, config_text, reply_to_message_id=message.id) + + def handle_callback_query(self, callback_query): + """Handle callback queries""" + if callback_query.data == "supported_sites": + # Group configs for display + config_groups = {} + for config in CONFIG_LIST: + config_type = config["type"] + if config_type not in config_groups: + config_groups[config_type] = [] + config_groups[config_type].append(config) + + sites_text = "**🌐 Supported Sites by Category:**\n\n" + for config_type, configs in config_groups.items(): + sites_text += f"**{config_type.upper()}** ({len(configs)} sites)\n" + for i, config in enumerate(configs[:10], 1): + domain = config['url_regex'].replace('\\', '').replace('r"', '').replace('"', '') + sites_text += f"`{domain}`\n" + if len(configs) > 10: + sites_text += f"... and {len(configs) - 10} more\n" + sites_text += "\n" + + callback_query.edit_message_text( + sites_text, + reply_markup=InlineKeyboardMarkup([ + [InlineKeyboardButton("🔙 Back", callback_data="back_to_start")] + ]) + ) + elif callback_query.data == "back_to_start": + callback_query.edit_message_text( + f"__👋 Hi **{callback_query.from_user.mention}**, I am Link Bypasser Bot v2.0, send me any supported links and I will get you results.\nCheckout /help to Read More__", + reply_markup=InlineKeyboardMarkup([ + [InlineKeyboardButton("🌐 Source Code", url="https://github.com/bipinkrish/Link-Bypasser-Bot")], + [InlineKeyboardButton("🔗 Supported Sites", callback_data="supported_sites")], + ]) + ) + + def handle_text_message(self, message): + """Handle text messages""" + bypass = Thread(target=lambda: self.process_message(message), daemon=True) + bypass.start() + + def handle_media_message(self, message): + """Handle media messages""" + try: + if message.document and message.document.file_name.endswith("dlc"): + bypass = Thread(target=lambda: self.handle_dlc_file(message), daemon=True) + bypass.start() + return + except: + pass + bypass = Thread(target=lambda: self.process_message(message, is_media=True), daemon=True) + bypass.start() + + def handle_dlc_file(self, message): + """Handle DLC file processing""" + msg = self.app.send_message( + message.chat.id, "🔎 __processing DLC file...__", reply_to_message_id=message.id + ) + + try: + file = self.app.download_media(message) + from src.bypasser.bypasser_functions import getlinks + dlccont = open(file, "r").read() + links = getlinks(dlccont) + self.app.edit_message_text( + message.chat.id, msg.id, f"__{links}__", disable_web_page_preview=True + ) + except Exception as e: + self.app.edit_message_text( + message.chat.id, msg.id, f"__Error processing DLC file: {e}__" + ) + finally: + try: + remove(file) + except: + pass + + def extract_urls(self, message, is_media=False): + """Extract URLs from message""" + urls = [] + texts = message.caption if is_media else message.text + if not texts: + return [] + + # Get entities + entities = [] + if is_media and hasattr(message, 'caption_entities') and message.caption_entities: + entities = message.caption_entities + elif message.entities: + entities = message.entities + + # Extract URLs from entities + if entities: + for entity in entities: + entity_type = str(entity.type).split('.')[-1].lower() + if entity_type == "url": + url = texts[entity.offset:entity.offset + entity.length] + urls.append(url) + elif entity_type == "text_link" and hasattr(entity, 'url'): + urls.append(entity.url) + + # Fallback URL extraction + urls.extend(self.extractor.find_urls(texts)) + urls.extend(re.findall(self.URL_REGEX, texts)) + + # Clean and normalize URLs + cleaned_urls = [] + for url in urls: + cleaned_url = url.strip(".,").rstrip("/") + if cleaned_url: + if not cleaned_url.startswith(('http://', 'https://')): + cleaned_url = 'https://' + cleaned_url + cleaned_urls.append(cleaned_url) + + return list(dict.fromkeys(cleaned_urls)) # Remove duplicates + + def get_processing_message(self, url): + """Get appropriate processing message based on URL type""" + if is_ddl_url(url): + return "⚡ __generating direct link...__" + elif is_freewall_url(url): + return "🕴️ __jumping the wall...__" + elif is_index_url(url): + return "📋 __scraping index...__" + elif "olamovies" in url or "psa.wf" in url: + return "⏳ __this might take some time...__" + else: + return "🔎 __bypassing...__" + + def handle_index_processing(self, url, message, msg): + """Handle index page processing""" + result = process_url(url) + try: + self.app.delete_messages(message.chat.id, msg.id) + except: + pass + + if self.database and result: + self.database.insert(url, result) + + if isinstance(result, list): + for page in result: + self.app.send_message( + message.chat.id, + page, + reply_to_message_id=message.id, + disable_web_page_preview=True, + ) + else: + self.app.send_message( + message.chat.id, + str(result), + reply_to_message_id=message.id, + disable_web_page_preview=True, + ) + + def handle_freewall_processing(self, url, message, msg): + """Handle freewall processing""" + freefile = process_url(url) + if freefile and isinstance(freefile, str) and freefile.endswith(('.png', '.jpg', '.pdf', '.pptx', '.html')): + try: + self.app.send_document( + message.chat.id, freefile, reply_to_message_id=message.id + ) + remove(freefile) + self.app.delete_messages(message.chat.id, [msg.id]) + return True + except Exception as e: + print(f"Error sending file: {e}") + + self.app.send_message( + message.chat.id, "__Failed to bypass paywall__", reply_to_message_id=message.id + ) + try: + self.app.delete_messages(message.chat.id, [msg.id]) + except: + pass + return True + + def process_message(self, message, is_media=False): + """Main message processing logic""" + urls = self.extract_urls(message, is_media) + + if not urls: + self.app.send_message( + message.chat.id, + "No valid URLs found in the message.", + reply_to_message_id=message.id + ) + return + + # Send processing message + first_url = urls[0] + processing_msg = self.get_processing_message(first_url) + msg = self.app.send_message(message.chat.id, processing_msg, reply_to_message_id=message.id) + + start_time = time() + results = [] + + for url in urls: + # Check database first + db_result = None + if self.database: + db_result = self.database.find(url) + + if db_result: + print("Found in DB") + results.append(str(db_result)) + continue + + # Handle special cases + if is_index_url(url): + self.handle_index_processing(url, message, msg) + return + + if is_freewall_url(url): + if self.handle_freewall_processing(url, message, msg): + return + continue + + # Process normally + try: + result = process_url(url) + if result: + # Add to database if successful + if (not db_result) and ("http://" in str(result) or "https://" in str(result)) and self.database: + self.database.insert(url, result) + results.append(str(result)) + print(f"Bypassed: {result}") + except Exception as e: + results.append(f"**Error**: {str(e)}") + print(f"Error processing {url}: {e}") + + # Send results + self.send_results(message, msg, results, time() - start_time) + + def send_results(self, message, msg, results, processing_time): + """Send the final results to user""" + if not results: + self.app.edit_message_text( + message.chat.id, msg.id, "__No results found__" + ) + return + + # Combine results + final_text = "\n".join(results) + + # Split large messages + final_messages = [] + tmp = "" + for line in final_text.split("\n"): + if len(tmp + line + "\n") > 4000: + final_messages.append(tmp) + tmp = line + "\n" + else: + tmp += line + "\n" + if tmp: + final_messages.append(tmp) + + try: + self.app.delete_messages(message.chat.id, msg.id) + except: + pass + + # Send messages + tmsgid = message.id + for text in final_messages: + if text.strip(): + tmsg = self.app.send_message( + message.chat.id, + f"__{text}__", + reply_to_message_id=tmsgid, + disable_web_page_preview=True, + ) + tmsgid = tmsg.id + + print(f"Processing took {processing_time:.2f} seconds") diff --git a/src/config.py b/src/config.py new file mode 100644 index 00000000..5938db5c --- /dev/null +++ b/src/config.py @@ -0,0 +1,140 @@ +""" +Dynamic configuration system that auto-discovers site modules +Scans sites/ directory and builds CONFIG_LIST from module metadata +""" + +import re +import importlib.util +from pathlib import Path +import logging + +logger = logging.getLogger(__name__) + +# Auto-discovered configuration list +CONFIG_LIST = [] + +def discover_and_load_sites(): + """ + Dynamically discover and load site modules from their directories + """ + global CONFIG_LIST + CONFIG_LIST.clear() + + src_dir = Path(__file__).parent + sites_dir = src_dir / "sites" + + if not sites_dir.exists(): + logger.warning(f"Sites directory not found: {sites_dir}") + return + + # Load sites from each category + categories = { + 'bypasser': sites_dir / 'bypasser', + 'ddl': sites_dir / 'ddl', + 'freewall': sites_dir / 'freewall' + } + + for category, category_dir in categories.items(): + if not category_dir.exists(): + continue + + for py_file in category_dir.glob("*.py"): + if py_file.name in ['__init__.py']: + continue + + try: + # Load the module + module_name = py_file.stem + spec = importlib.util.spec_from_file_location(f"{category}_{module_name}", py_file) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + + # Check if module has required attributes + if not (hasattr(module, 'SITE_NAME') and hasattr(module, 'URL_PATTERNS') and hasattr(module, 'process_url')): + logger.warning(f"Module {py_file} missing required attributes (SITE_NAME, URL_PATTERNS, process_url)") + continue + + # Add each URL pattern as a separate config entry + for pattern in module.URL_PATTERNS: + CONFIG_LIST.append({ + 'name': module.SITE_NAME.lower().replace(' ', '_'), + 'display_name': module.SITE_NAME, + 'type': category, + 'url_regex': pattern, + 'callback_function': module.process_url, + 'module_file': str(py_file.relative_to(src_dir)) + }) + + logger.info(f"Loaded {category} module: {module.SITE_NAME} ({len(module.URL_PATTERNS)} patterns)") + + except Exception as e: + logger.error(f"Failed to load {category} module {py_file}: {e}") + + # Add a fallback entry so it shows in lists + CONFIG_LIST.append({ + 'name': py_file.stem, + 'display_name': py_file.stem.title(), + 'type': category, + 'url_regex': f'.*{py_file.stem}.*', + 'callback_function': lambda url, err=str(e): f"Module {py_file.stem} failed to load: {err}", + 'module_file': str(py_file.relative_to(src_dir)) + }) + +def get_function_by_url(url): + """Get the appropriate function for a URL""" + for item in CONFIG_LIST: + if re.search(item['url_regex'], url, re.IGNORECASE): + return item['callback_function'] + return None + +def get_sites_by_type(site_type): + """Get all site names of a specific type""" + seen = set() + result = [] + for item in CONFIG_LIST: + if item['type'] == site_type and item['display_name'] not in seen: + seen.add(item['display_name']) + result.append(item['display_name']) + return result + +def get_all_site_names(): + """Get all site names grouped by type""" + return { + 'bypasser': get_sites_by_type('bypasser'), + 'ddl': get_sites_by_type('ddl'), + 'freewall': get_sites_by_type('freewall') + } + +def get_config_stats(): + """Get statistics about the configuration""" + unique_sites = {} + for item in CONFIG_LIST: + site_type = item['type'] + display_name = item['display_name'] + if site_type not in unique_sites: + unique_sites[site_type] = set() + unique_sites[site_type].add(display_name) + + stats = { + 'total': sum(len(sites) for sites in unique_sites.values()), + 'bypasser': len(unique_sites.get('bypasser', set())), + 'ddl': len(unique_sites.get('ddl', set())), + 'freewall': len(unique_sites.get('freewall', set())), + 'total_patterns': len(CONFIG_LIST) + } + return stats + +def reload_sites(): + """Reload all site modules (useful for development)""" + discover_and_load_sites() + return get_config_stats() + +# Initialize on import +discover_and_load_sites() + +# Print loading summary +stats = get_config_stats() +print(f"✅ Auto-discovered {stats['total']} sites with {stats['total_patterns']} URL patterns:") +print(f" - Bypassers: {stats['bypasser']} sites") +print(f" - DDL: {stats['ddl']} sites") +print(f" - Freewall: {stats['freewall']} sites") diff --git a/src/core/__init__.py b/src/core/__init__.py new file mode 100644 index 00000000..ae94ebcc --- /dev/null +++ b/src/core/__init__.py @@ -0,0 +1,8 @@ +""" +Utility modules for Link Bypasser Bot +""" + +from .db import DB +from .texts import HELP_TEXT + +__all__ = ['DB', 'HELP_TEXT'] diff --git a/src/core/db.py b/src/core/db.py new file mode 100644 index 00000000..8188983e --- /dev/null +++ b/src/core/db.py @@ -0,0 +1,185 @@ +try: + from pymongo import MongoClient + from pymongo.errors import ConnectionFailure, DuplicateKeyError + MONGODB_AVAILABLE = True +except ImportError: + MongoClient = None + ConnectionFailure = None + DuplicateKeyError = None + MONGODB_AVAILABLE = False + +from datetime import datetime +import os +import hashlib + +class DB: + def __init__(self, connection_string=None, db_name="linkbypasser", collection_name="results") -> None: + """ + Initialize MongoDB connection for Link Bypasser Bot + + Args: + connection_string: MongoDB connection string (default: from env MONGODB_URI) + db_name: Database name (default: "linkbypasser") + collection_name: Collection name (default: "results") + """ + if not MONGODB_AVAILABLE: + raise Exception("PyMongo not available. Install with: pip install pymongo") + + # Get connection string from environment or parameter + self.connection_string = connection_string or os.getenv('MONGODB_URI') + if not self.connection_string: + # Default to local MongoDB if no connection string provided + self.connection_string = "mongodb://localhost:27017/" + + self.db_name = db_name + self.collection_name = collection_name + + try: + # Initialize MongoDB client + self.client = MongoClient(self.connection_string, serverSelectionTimeoutMS=5000) + + # Test connection + self.client.admin.command('ping') + + # Get database and collection + self.db = self.client[self.db_name] + self.collection = self.db[self.collection_name] + + # Create indexes for better performance + self.collection.create_index("link", unique=True) + self.collection.create_index("created_at") + self.collection.create_index("link_hash") + + print(f"✅ Connected to MongoDB: {self.db_name}.{self.collection_name}") + + except ConnectionFailure as e: + raise Exception(f"Failed to connect to MongoDB: {e}") + except Exception as e: + raise Exception(f"MongoDB initialization error: {e}") + + def _hash_link(self, link: str) -> str: + """Create a hash of the link for faster lookups""" + return hashlib.md5(link.encode()).hexdigest() + + def insert(self, link: str, result: str) -> bool: + """ + Insert a link and its bypass result into the database + + Args: + link: Original shortened/protected link + result: Bypassed/direct link result + + Returns: + bool: True if inserted successfully, False otherwise + """ + try: + document = { + "link": link, + "link_hash": self._hash_link(link), + "result": result, + "created_at": datetime.utcnow(), + "updated_at": datetime.utcnow() + } + + # Use upsert to update if exists, insert if new + filter_query = {"link": link} + update_query = { + "$set": document, + "$setOnInsert": {"created_at": datetime.utcnow()} + } + + result = self.collection.update_one( + filter_query, + update_query, + upsert=True + ) + + return True + + except Exception as e: + print(f"Error inserting to MongoDB: {e}") + return False + + def find(self, link: str) -> str: + """ + Find the bypass result for a given link + + Args: + link: Original shortened/protected link to search for + + Returns: + str: Bypassed result if found, None otherwise + """ + try: + # First try exact link match + document = self.collection.find_one({"link": link}) + + if document: + # Update access time for cache management + self.collection.update_one( + {"_id": document["_id"]}, + {"$set": {"last_accessed": datetime.utcnow()}} + ) + return document.get("result") + + # Fallback: try hash-based lookup for performance + link_hash = self._hash_link(link) + document = self.collection.find_one({"link_hash": link_hash}) + + if document: + self.collection.update_one( + {"_id": document["_id"]}, + {"$set": {"last_accessed": datetime.utcnow()}} + ) + return document.get("result") + + return None + + except Exception as e: + print(f"Error finding in MongoDB: {e}") + return None + + def get_stats(self) -> dict: + """Get database statistics""" + try: + total_links = self.collection.count_documents({}) + + # Get recent activity (last 24 hours) + from datetime import timedelta + yesterday = datetime.utcnow() - timedelta(days=1) + recent_count = self.collection.count_documents({ + "created_at": {"$gte": yesterday} + }) + + return { + "total_links": total_links, + "recent_links_24h": recent_count, + "database": self.db_name, + "collection": self.collection_name + } + except Exception as e: + print(f"Error getting stats: {e}") + return {} + + def cleanup_old_entries(self, days_old: int = 30) -> int: + """Remove entries older than specified days""" + try: + from datetime import timedelta + cutoff_date = datetime.utcnow() - timedelta(days=days_old) + + result = self.collection.delete_many({ + "created_at": {"$lt": cutoff_date} + }) + + print(f"🧹 Cleaned up {result.deleted_count} old entries") + return result.deleted_count + + except Exception as e: + print(f"Error cleaning up: {e}") + return 0 + + def close(self): + """Close the MongoDB connection""" + if hasattr(self, 'client'): + self.client.close() + print("📴 MongoDB connection closed") diff --git a/src/core/texts.py b/src/core/texts.py new file mode 100644 index 00000000..8578f6ad --- /dev/null +++ b/src/core/texts.py @@ -0,0 +1,152 @@ +""" +Dynamic text generation from configuration +Builds help text automatically from CONFIG_LIST +""" + +""" +Dynamic text generation from configuration +Builds help text automatically from CONFIG_LIST +""" + +def build_dynamic_text(): + """Build help text dynamically from config""" + try: + # Import here to avoid circular imports + from ..config import get_all_site_names + + sites = get_all_site_names() + + # Build DDL text + ddl_sites = sites.get('ddl', []) + if ddl_sites: + ddl_list = ' \n- '.join(ddl_sites) + ddltext = f"__- {ddl_list}\n __" + else: + ddltext = "__- No DDL sites configured\n __" + + # Build Bypasser text (shorteners) + bypasser_sites = sites.get('bypasser', []) + if bypasser_sites: + bypasser_list = ' \n- '.join(bypasser_sites) + shortnertext = f"__- {bypasser_list}\n __" + else: + shortnertext = "__- No bypasser sites configured\n __" + + # Build Freewall text + freewall_sites = sites.get('freewall', []) + if freewall_sites: + freewall_list = ' \n- '.join(freewall_sites) + freewalltext = f"__- {freewall_list}\n __" + else: + freewalltext = "__- No freewall sites configured\n __" + + # GDrive sites are part of DDL but show separately + gdrive_related = [site for site in ddl_sites if 'drive' in site.lower() or 'gdrive' in site.lower()] + if not gdrive_related: + gdrive_related = ['google_drive', 'onedrive'] + if gdrive_related: + gdrive_list = ' \n- '.join(gdrive_related) + gdrivetext = f"__- {gdrive_list}\n __" + else: + gdrivetext = "__- No gdrive sites configured\n __" + + # Others (general utilities) + all_sites = bypasser_sites + ddl_sites + freewall_sites + if all_sites: + others_list = ' \n- '.join(all_sites[:5]) + otherstext = f"__- {others_list}\n __" + else: + otherstext = "__- No sites configured\n __" + + return ddltext, shortnertext, freewalltext, gdrivetext, otherstext + + except ImportError: + # Fallback to static text if config not available + return get_static_texts() + +def get_static_texts(): + """Dynamic fallback texts from config if available""" + try: + # Try to get from config even in fallback mode + from ..config import get_all_site_names + sites = get_all_site_names() + + # Build from available sites + ddl_sites = sites.get('ddl', []) + if ddl_sites: + ddl_list = ' \n- '.join(ddl_sites) + ddltext = f"__- {ddl_list}\n __" + else: + ddltext = "__- No DDL sites configured\n __" + + bypasser_sites = sites.get('bypasser', []) + if bypasser_sites: + bypasser_list = ' \n- '.join(bypasser_sites) + shortnertext = f"__- {bypasser_list}\n __" + else: + shortnertext = "__- No bypasser sites configured\n __" + + freewall_sites = sites.get('freewall', []) + if freewall_sites: + freewall_list = ' \n- '.join(freewall_sites) + freewalltext = f"__- {freewall_list}\n __" + else: + freewalltext = "__- No freewall sites configured\n __" + + gdrive_related = [site for site in ddl_sites if 'drive' in site.lower() or 'gdrive' in site.lower()] + if not gdrive_related: + gdrive_related = ['No GDrive sites available'] + gdrive_list = ' \n- '.join(gdrive_related) + gdrivetext = f"__- {gdrive_list}\n __" + + all_sites = bypasser_sites + ddl_sites + freewall_sites + if all_sites: + others_list = ' \n- '.join(all_sites[:10]) + otherstext = f"__- {others_list}\n __" + else: + otherstext = "__- No sites configured\n __" + + return ddltext, shortnertext, freewalltext, gdrivetext, otherstext + + except: + # Ultimate fallback - minimal text + return ("__- No sites available\n __",) * 5 + +# Get texts (dynamic or static) +ddltext, shortnertext, freewalltext, gdrivetext, otherstext = build_dynamic_text() + +# Build the main help text +ddltext, shortnertext, freewalltext, gdrivetext, otherstext = build_dynamic_text() + +HELP_TEXT = (f"**--Just Send me any Supported Links From Below Mentioned Sites--** \n\n" + f"**List of Sites for DDL : ** \n\n{ddltext} \n" + f"**List of Sites for Shortners : ** \n\n{shortnertext} \n" + f"**List of Sites for GDrive Look-ALike : ** \n\n{gdrivetext} \n" + f"**List of Sites for Jumping Paywall : ** \n\n{freewalltext} \n" + f"**Other Supported Sites : ** \n\n{otherstext}") + +def get_dynamic_help_text(): + """Get updated help text with current config""" + ddl, shortner, freewall, gdrive, others = build_dynamic_text() + return (f"**--Just Send me any Supported Links From Below Mentioned Sites--** \n\n" + f"**List of Sites for DDL : ** \n\n{ddl} \n" + f"**List of Sites for Shortners : ** \n\n{shortner} \n" + f"**List of Sites for GDrive Look-ALike : ** \n\n{gdrive} \n" + f"**List of Sites for Jumping Paywall : ** \n\n{freewall} \n" + f"**Other Supported Sites : ** \n\n{others}") + +def get_stats_text(): + """Get statistics text about supported sites""" + try: + from ..config import get_config_stats + stats = get_config_stats() + return f"""**📊 Bot Statistics:** + +**Total Supported Sites:** {stats.get('total', 0)} +• **Bypassers:** {stats.get('bypasser', 0)} sites +• **Direct Downloads:** {stats.get('ddl', 0)} sites +• **Paywall Bypass:** {stats.get('freewall', 0)} sites + +*Bot is ready to process your links!*""" + except: + return "**Bot is ready to process your links!**" diff --git a/src/core/utils.py b/src/core/utils.py new file mode 100644 index 00000000..32511b7d --- /dev/null +++ b/src/core/utils.py @@ -0,0 +1,58 @@ +"""Base downloader functions for freewall sites""" + +import requests +import base64 +import re +from bs4 import BeautifulSoup + +def getSoup(res): + """Parse HTML response into BeautifulSoup object""" + return BeautifulSoup(res.text, "html.parser") + +def downloaderla(url, site): + """Common downloader function for downloader.la based sites""" + try: + rtoken = RecaptchaV3() + except: + rtoken = "dummy_token" + + params = { + "url": url, + "token": rtoken, + } + return requests.get(site, params=params).json() + +def getImg(url): + """Download image content from URL""" + return requests.get(url).content + +def decrypt(res, key): + """Decrypt base64 encoded result from API response""" + if res["success"]: + return base64.b64decode(res["result"].split(key)[-1]).decode("utf-8") + else: + raise Exception("API request failed") + +def RecaptchaV3(): + """ + RECAPTCHA v3 BYPASS + Code from https://github.com/xcscxr/Recaptcha-v3-bypass + """ + try: + ANCHOR_URL = "https://www.google.com/recaptcha/api2/anchor?ar=1&k=6Lcr1ncUAAAAAH3cghg6cOTPGARa8adOf-y9zv2x&co=aHR0cHM6Ly9vdW8ucHJlc3M6NDQz&hl=en&v=pCoGBhjs9s8EhFOHJFe8cqis&size=invisible&cb=ahgyd1gkfkhe" + url_base = "https://www.google.com/recaptcha/" + post_data = "v={}&reason=q&c={}&k={}&co={}" + client = requests.Session() + client.headers.update({"content-type": "application/x-www-form-urlencoded"}) + matches = re.findall("([api2|enterprise]+)\/anchor\?(.*)", ANCHOR_URL)[0] + url_base += matches[0] + "/" + params = matches[1] + res = client.get(url_base + "anchor", params=params) + token = re.findall(r'"recaptcha-token" value="(.*?)"', res.text)[0] + params = dict(pair.split("=") for pair in params.split("&")) + post_data = post_data.format(params["v"], token, params["k"], params["co"]) + res = client.post(url_base + "reload", params=f'k={params["k"]}', data=post_data) + answer = re.findall(r'"rresp","(.*?)"', res.text)[0] + return answer + except: + return "fallback_token" \ No newline at end of file diff --git a/src/main.py b/src/main.py new file mode 100644 index 00000000..2e76c4f0 --- /dev/null +++ b/src/main.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +""" +Link Bypasser Bot - Main Entry Point +Clean and simple main file using bot core +""" + +from pyrogram import Client, BotCommand +import os +import sys + +# Add src to path +sys.path.append(os.path.join(os.path.dirname(__file__), 'src')) + +from src.bot_core import BotCore +from src.core.db import DB +from src.config import CONFIG_LIST + +def get_env_config(): + """Get configuration from environment variables (config.json optional)""" + # Try to load config.json as fallback, but don't require it + DATA = {} + try: + from json import load + with open("config.json", "r") as f: + DATA = load(f) + except: + print("📄 config.json not found or invalid - using environment variables only") + + def getenv(var, default=None): + return os.environ.get(var) or DATA.get(var, default) + + return { + "bot_token": getenv("TOKEN"), + "api_hash": getenv("HASH"), + "api_id": getenv("ID"), + "db_api": getenv("DB_API"), + "db_owner": getenv("DB_OWNER", "bipinkrish"), # default owner + "db_name": getenv("DB_NAME", "link_bypass.db") # default db name + } + +def setup_database(config): + """Setup database connection""" + try: + if all([config["db_api"], config["db_owner"], config["db_name"]]): + return DB( + api_key=config["db_api"], + db_owner=config["db_owner"], + db_name=config["db_name"] + ) + except Exception as e: + print(f"Database setup failed: {e}") + + print("Database not configured or failed to connect") + return None + +def main(): + """Main function to start the bot""" + print("🚀 Starting Link Bypasser Bot v2.0...") + print(f"📋 Loaded {len(CONFIG_LIST)} bypasser configurations") + + # Show summary of config types + type_counts = {} + for config in CONFIG_LIST: + type_counts[config['type']] = type_counts.get(config['type'], 0) + 1 + + for bypass_type, count in type_counts.items(): + print(f" {bypass_type}: {count} sites") + + # Get configuration + config = get_env_config() + + if not all([config["bot_token"], config["api_hash"], config["api_id"]]): + print("❌ Missing required bot configuration (TOKEN, HASH, ID)") + print(" Please set environment variables or config.json file") + return + + # Setup database + database = setup_database(config) + + # Create bot client + app = Client( + "link_bypasser_bot", + api_id=config["api_id"], + api_hash=config["api_hash"], + bot_token=config["bot_token"] + ) + + # Setup bot commands + with app: + app.set_bot_commands([ + BotCommand("start", "Welcome Message"), + BotCommand("help", "List of All Supported Sites"), + BotCommand("config", "Show Current Configuration"), + ]) + + # Initialize bot core + bot_core = BotCore(app, database) + bot_core.setup_handlers() + + print("✅ Bot is ready and running...") + + # Start the bot + app.run() + +if __name__ == "__main__": + main() diff --git a/src/sites/bypasser/adfly.py b/src/sites/bypasser/adfly.py new file mode 100644 index 00000000..ae4f95c1 --- /dev/null +++ b/src/sites/bypasser/adfly.py @@ -0,0 +1,76 @@ +""" +Adfly bypasser +""" + +import re +import base64 +import cloudscraper +from urllib.parse import unquote + +# Site configuration +SITE_NAME = "Adfly" +URL_PATTERNS = [ + r'adf\.ly/', + r'adfly\.com/', + r'j\.gs/', + r'adfoc\.us/' +] + +def decrypt_url(code): + """ + Decrypt Adfly URL using original algorithm + """ + a, b = "", "" + for i in range(0, len(code)): + if i % 2 == 0: + a += code[i] + else: + b = code[i] + b + key = list(a + b) + i = 0 + while i < len(key): + if key[i].isdigit(): + for j in range(i + 1, len(key)): + if key[j].isdigit(): + u = int(key[i]) ^ int(key[j]) + if u < 10: + key[i] = str(u) + i = j + break + i += 1 + key = "".join(key) + try: + decrypted = base64.b64decode(key)[16:-16] + return decrypted.decode("utf-8") + except: + return None + +def adfly_bypass(url): + """ + Bypass Adfly short links using original algorithm + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + res = client.get(url).text + + try: + ysmm = re.findall(r"ysmm\s*=\s*['\"](.*?)['\"]", res)[0] + except: + return f"Error: Could not find Adfly decryption key in {url}" + + decoded_url = decrypt_url(ysmm) + if not decoded_url: + return f"Error: Failed to decrypt Adfly URL" + + if re.search(r"go\.php\?u=", decoded_url): + decoded_url = base64.b64decode(re.sub(r"(.*?)u=", "", decoded_url)).decode() + elif "&dest=" in decoded_url: + decoded_url = unquote(re.sub(r"(.*?)dest=", "", decoded_url)) + + return decoded_url + + except Exception as e: + return f"Error bypassing Adfly: {str(e)}" + +# Common export function name +process_url = adfly_bypass diff --git a/src/sites/bypasser/adrinolinks.py b/src/sites/bypasser/adrinolinks.py new file mode 100644 index 00000000..e63e1a8f --- /dev/null +++ b/src/sites/bypasser/adrinolinks.py @@ -0,0 +1,50 @@ +"""Adrinolinks URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "Adrinolinks" +URL_PATTERNS = [r"adrinolinks\."] + +def process_url(url: str) -> str: + """Bypass Adrinolinks shortened URLs + + Args: + url: Adrinolinks shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + # Normalize URL format + if "https://adrinolinks.in/" not in url: + url = "https://adrinolinks.in/" + url.split("/")[-1] + + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://adrinolinks.in" + ref = "https://wikitraveltips.com/" + h = {"referer": ref} + + resp = client.get(url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(8) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/anonfile_simple.py b/src/sites/bypasser/anonfile_simple.py new file mode 100644 index 00000000..81b2aaec --- /dev/null +++ b/src/sites/bypasser/anonfile_simple.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Anonfile bypasser (simplified) +Direct link extraction from anonfiles.com using text parsing + +Site: anonfiles.com +Method: Text parsing to find CDN links +""" + +try: + import requests + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "anonfile" +URL_PATTERNS = [ + r'anonfiles\.com/[a-zA-Z0-9]+/' +] + +def process_url(url: str) -> str: + """ + Extract direct download link from anonfiles.com + + Args: + url: anonfiles.com URL + + Returns: + Direct download link or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: requests module not available" + + try: + headersList = {"Accept": "*/*"} + payload = "" + + response = requests.request( + "GET", url, data=payload, headers=headersList + ).text.split("\n") + + for ele in response: + if ( + "https://cdn" in ele + and "anonfiles.com" in ele + and url.split("/")[-2] in ele + ): + break + else: + return "ERROR: CDN link not found in response" + + return ele.split('href="')[1].split('"')[0] + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/bitly.py b/src/sites/bypasser/bitly.py new file mode 100644 index 00000000..a5be1558 --- /dev/null +++ b/src/sites/bypasser/bitly.py @@ -0,0 +1,25 @@ +""" +Bitly bypasser - Simple URL shortener bypass +""" + +import requests + +# Site configuration +SITE_NAME = "Bitly" +URL_PATTERNS = [ + r'bit\.ly', + r'bitly\.com' +] + +def bypass_bitly(url): + """ + Bypass bitly shortened URLs + """ + try: + response = requests.head(url, allow_redirects=True, timeout=10) + return response.url + except Exception as e: + return f"Error bypassing bitly: {str(e)}" + +# Common export function name +process_url = bypass_bitly diff --git a/src/sites/bypasser/bluemediafiles.py b/src/sites/bypasser/bluemediafiles.py new file mode 100644 index 00000000..6e75f58e --- /dev/null +++ b/src/sites/bypasser/bluemediafiles.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Bluemediafiles bypasser +Extracts direct download links from bluemediafiles.com + +Site: bluemediafiles.com +Method: Script parsing and key decoding +""" + +try: + import requests + from bs4 import BeautifulSoup + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "bluemediafiles" +URL_PATTERNS = [ + r'bluemediafiles\.com' +] + +def decode_key(encoded): + """Decode the encoded key from bluemediafiles script""" + key = "" + + i = len(encoded) // 2 - 5 + while i >= 0: + key += encoded[i] + i = i - 2 + + i = len(encoded) // 2 + 4 + while i < len(encoded): + key += encoded[i] + i = i + 2 + + return key + +def process_url(url: str, torrent=False) -> str: + """ + Bypass bluemediafiles.com URLs + + Args: + url: bluemediafiles.com URL + torrent: Whether to use torrent extraction path + + Returns: + Direct download URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: requests and bs4 modules not available" + + try: + headers = { + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", + "Accept-Language": "en-US,en;q=0.5", + "Alt-Used": "bluemediafiles.com", + "Connection": "keep-alive", + "Upgrade-Insecure-Requests": "1", + "Sec-Fetch-Dest": "document", + "Sec-Fetch-Mode": "navigate", + "Sec-Fetch-Site": "none", + "Sec-Fetch-User": "?1", + } + + res = requests.get(url, headers=headers) + soup = BeautifulSoup(res.text, "html.parser") + script = str(soup.findAll("script")[3]) + encoded_key = script.split('Create_Button("')[1].split('");')[0] + + headers = { + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", + "Accept-Language": "en-US,en;q=0.5", + "Referer": url, + "Alt-Used": "bluemediafiles.com", + "Connection": "keep-alive", + "Upgrade-Insecure-Requests": "1", + "Sec-Fetch-Dest": "document", + "Sec-Fetch-Mode": "navigate", + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-User": "?1", + } + + params = {"url": decode_key(encoded_key)} + + if torrent: + res = requests.get( + "https://dl.pcgamestorrents.org/get-url.php", params=params, headers=headers + ) + soup = BeautifulSoup(res.text, "html.parser") + furl = soup.find("a", class_="button").get("href") + else: + res = requests.get( + "https://bluemediafiles.com/get-url.php", params=params, headers=headers + ) + furl = res.url + if "mega.nz" in furl: + furl = furl.replace("mega.nz/%23!", "mega.nz/file/").replace("!", "#") + + return furl + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/droplink.py b/src/sites/bypasser/droplink.py new file mode 100644 index 00000000..290ad2d9 --- /dev/null +++ b/src/sites/bypasser/droplink.py @@ -0,0 +1,51 @@ +""" +Droplink bypasser +""" + +import re +import time +import cloudscraper +from bs4 import BeautifulSoup +from urllib.parse import urlparse + +# Site configuration +SITE_NAME = "Droplink" +URL_PATTERNS = [ + r'droplink\.co/', + r'droplinks\.co/' +] + +def droplink_bypass(url): + """ + Bypass Droplink short links + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + res = client.get(url, timeout=5) + + ref = re.findall("action[ ]{0,}=[ ]{0,}['|\"](.*?)['|\"]", res.text)[0] + h = {"referer": ref} + res = client.get(url, headers=h) + + bs4 = BeautifulSoup(res.content, "html.parser") + inputs = bs4.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = { + "content-type": "application/x-www-form-urlencoded", + "x-requested-with": "XMLHttpRequest", + } + + p = urlparse(url) + final_url = f"{p.scheme}://{p.netloc}/links/go" + time.sleep(3.1) + res = client.post(final_url, data=data, headers=h).json() + + if res["status"] == "success": + return res["url"] + return "Something went wrong with Droplink bypass" + + except Exception as e: + return f"Error bypassing Droplink: {str(e)}" + +# Common export function name +process_url = droplink_bypass diff --git a/src/sites/bypasser/dulink.py b/src/sites/bypasser/dulink.py new file mode 100644 index 00000000..292064f7 --- /dev/null +++ b/src/sites/bypasser/dulink.py @@ -0,0 +1,44 @@ +"""Dulink URL bypasser module""" + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "Dulink" +URL_PATTERNS = [r"du-link\."] + +def process_url(url: str) -> str: + """Bypass Dulink shortened URLs + + Args: + url: Dulink shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://du-link.in" + url = url[:-1] if url[-1] == "/" else url + ref = "https://profitshort.com/" + h = {"referer": ref} + + resp = client.get(url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/earnl.py b/src/sites/bypasser/earnl.py new file mode 100644 index 00000000..40aa2b91 --- /dev/null +++ b/src/sites/bypasser/earnl.py @@ -0,0 +1,45 @@ +""" +Earnl bypasser +""" + +import time +import requests +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Earnl" +URL_PATTERNS = [ + r'earnl\.xyz/', + r'v\.earnl\.xyz/' +] + +def earnl_bypass(url): + """ + Bypass Earnl short links + """ + try: + client = requests.session() + DOMAIN = "https://v.earnl.xyz" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://link.modmakers.xyz/" + h = {"referer": ref} + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(5) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return "Something went wrong with Earnl bypass" + + except Exception as e: + return f"Error bypassing Earnl: {str(e)}" + +# Common export function name +process_url = earnl_bypass diff --git a/src/sites/bypasser/easysky.py b/src/sites/bypasser/easysky.py new file mode 100644 index 00000000..c9a9b12f --- /dev/null +++ b/src/sites/bypasser/easysky.py @@ -0,0 +1,49 @@ +"""Easysky URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "Easysky" +URL_PATTERNS = [r"easysky\."] + +def process_url(url: str) -> str: + """Bypass Easysky shortened URLs + + Args: + url: Easysky shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://techy.veganab.co/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://veganab.co/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(8) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/ez4short.py b/src/sites/bypasser/ez4short.py new file mode 100644 index 00000000..fc5322dc --- /dev/null +++ b/src/sites/bypasser/ez4short.py @@ -0,0 +1,62 @@ +""" +EZ4Short bypasser +""" + +import requests +import re +import time +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "EZ4Short" +URL_PATTERNS = [ + r'ez4short\.com/', + r'e-z\.host/' +] + +def ez4short_bypass(url): + """ + Bypass EZ4Short URLs + """ + try: + domain = 'https://ez4short.com' + code = url.split('/')[-1] + + sess = requests.Session() + h = { + 'authority': 'ez4short.com', + 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', + 'accept-language': 'en-US,en;q=0.9', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' + } + + resp = sess.get(url, headers=h) + soup = BeautifulSoup(resp.text, 'html.parser') + + # Look for the form with hidden inputs + inputs = soup.find_all('input') + data = {inp.get('name'): inp.get('value') for inp in inputs if inp.get('name')} + + if 'id' in data and 'tp' in data: + time.sleep(5) + + # Submit the form + post_url = f"{domain}/links/go" + h['x-requested-with'] = 'XMLHttpRequest' + h['referer'] = url + + resp2 = sess.post(post_url, data=data, headers=h) + try: + result = resp2.json() + if 'url' in result: + return result['url'] + except: + pass + + return f"Could not bypass EZ4Short URL: {url}" + + except Exception as e: + return f"Error bypassing EZ4Short: {str(e)}" + +# Common export function name +process_url = ez4short_bypass diff --git a/src/sites/bypasser/filecrypt.py b/src/sites/bypasser/filecrypt.py new file mode 100644 index 00000000..448c194d --- /dev/null +++ b/src/sites/bypasser/filecrypt.py @@ -0,0 +1,87 @@ +""" +Filecrypt bypasser +""" + +import requests +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Filecrypt" +URL_PATTERNS = [ + r'filecrypt\.co/', + r'filecrypt\.cc/' +] + +def getlinks(dlc): + """ + Extract links from DLC content using dcrypt.it + """ + try: + headers = { + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0", + "Accept": "application/json, text/javascript, */*", + "Accept-Language": "en-US,en;q=0.5", + "X-Requested-With": "XMLHttpRequest", + "Origin": "http://dcrypt.it", + "Connection": "keep-alive", + "Referer": "http://dcrypt.it/", + } + + data = { + "content": dlc, + } + + response = requests.post( + "http://dcrypt.it/decrypt/paste", headers=headers, data=data + ).json()["success"]["links"] + + links = "" + for link in response: + links = links + link + "\n\n" + return links[:-1] if links else "No links found" + except: + return "Error extracting links from DLC" + +def filecrypt_bypass(url): + """ + Bypass Filecrypt links and extract DLC content + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + headers = { + "authority": "filecrypt.co", + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "accept-language": "en-US,en;q=0.9", + "cache-control": "max-age=0", + "content-type": "application/x-www-form-urlencoded", + "origin": "https://filecrypt.co", + "referer": url, + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", + } + + resp = client.get(url, headers=headers) + soup = BeautifulSoup(resp.content, "html.parser") + + # Find the DLC download button + buttons = soup.find_all("button") + dlclink = None + + for ele in buttons: + onclick = ele.get("onclick") + if onclick and "DownloadDLC" in onclick: + dlc_id = onclick.split("DownloadDLC('")[1].split("'")[0] + dlclink = f"https://filecrypt.co/DLC/{dlc_id}.html" + break + + if not dlclink: + return "Error: Could not find DLC download link" + + resp = client.get(dlclink, headers=headers) + return getlinks(resp.text) + + except Exception as e: + return f"Error bypassing Filecrypt: {str(e)}" + +# Common export function name +process_url = filecrypt_bypass diff --git a/src/sites/bypasser/flashl.py b/src/sites/bypasser/flashl.py new file mode 100644 index 00000000..e255118e --- /dev/null +++ b/src/sites/bypasser/flashl.py @@ -0,0 +1,45 @@ +""" +Flashlink bypasser +""" + +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Flashlink" +URL_PATTERNS = [ + r'files\.earnash\.com/', + r'flash1\.cordtpoint\.co\.in/' +] + +def flashl_bypass(url): + """ + Bypass Flashlink short links + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://files.earnash.com/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://flash1.cordtpoint.co.in" + h = {"referer": ref} + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(15) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return "Something went wrong with Flashlink bypass" + + except Exception as e: + return f"Error bypassing Flashlink: {str(e)}" + +# Common export function name +process_url = flashl_bypass diff --git a/src/sites/bypasser/gdrive_family.py b/src/sites/bypasser/gdrive_family.py new file mode 100644 index 00000000..f22ab75e --- /dev/null +++ b/src/sites/bypasser/gdrive_family.py @@ -0,0 +1,118 @@ +"""GDrive look-alike sites unified bypasser module""" + +import re +from urllib.parse import urlparse + +try: + import cloudscraper + from lxml import etree + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + etree = None + +SITE_NAME = "GDrive Family" +URL_PATTERNS = [ + r"appdrive\.", r"driveapp\.", r"drivehub\.", r"gdflix\.", r"drivesharer\.", + r"drivebit\.", r"drivelinks\.", r"driveace\.", r"drivepro\.", r"driveseed\." +] + +def process_url(url: str) -> str: + """Bypass GDrive look-alike sites to get direct Google Drive links + + Unified function that handles multiple GDrive clone sites with login + + Args: + url: GDrive look-alike URL (appdrive, driveapp, etc.) + + Returns: + Direct Google Drive link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, lxml) not available" + + try: + # Default account credentials + Email = "chzeesha4@gmail.com" + Password = "zeeshi#789" + + account = {"email": Email, "passwd": Password} + client = cloudscraper.create_scraper(allow_brotli=False) + client.headers.update({ + "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" + }) + + # Login to the site + data = {"email": account["email"], "password": account["passwd"]} + client.post(f"https://{urlparse(url).netloc}/login", data=data) + + # Get the main page + res = client.get(url) + key = re.findall('"key",\\s+"(.*?)"', res.text)[0] + ddl_btn = etree.HTML(res.content).xpath("//button[@id='drc']") + + # Parse file info + info = re.findall(">(.*?)<\\/li>", res.text) + info_parsed = {} + for item in info: + kv = [s.strip() for s in item.split(": ", maxsplit=1)] + if len(kv) == 2: + info_parsed[kv[0].lower()] = kv[1] + + info_parsed["error"] = False + info_parsed["link_type"] = "login" + + # Prepare request data + headers = { + "Content-Type": f"multipart/form-data; boundary={'-'*4}_", + } + data = {"type": 1, "key": key, "action": "original"} + + if len(ddl_btn): + info_parsed["link_type"] = "direct" + data["action"] = "direct" + + # Try to get the download link + while data["type"] <= 3: + boundary = f'{"-"*6}_' + data_string = "" + for item in data: + data_string += f"{boundary}\\r\\n" + data_string += f'Content-Disposition: form-data; name="{item}"\\r\\n\\r\\n{data[item]}\\r\\n' + data_string += f"{boundary}--\\r\\n" + gen_payload = data_string + + try: + response = client.post(url, data=gen_payload, headers=headers).json() + break + except Exception: + data["type"] += 1 + + if "url" in response: + info_parsed["gdrive_link"] = response["url"] + elif "error" in response and response["error"]: + info_parsed["error"] = True + info_parsed["error_message"] = response["message"] + else: + info_parsed["error"] = True + info_parsed["error_message"] = "Something went wrong :(" + + if info_parsed["error"]: + return f"ERROR: {info_parsed.get('error_message', 'Unknown error')}" + + # Site-specific post-processing + netloc = urlparse(url).netloc.lower() + + if any(site in netloc for site in ["driveapp", "drivehub", "gdflix", "drivesharer", "drivebit", "drivelinks", "driveace", "drivepro"]): + res = client.get(info_parsed["gdrive_link"]) + try: + drive_link = etree.HTML(res.content).xpath("//a[contains(@class,'btn')]/@href")[0] + info_parsed["gdrive_link"] = drive_link + except (IndexError, TypeError): + pass # Keep original link if parsing fails + + return info_parsed["gdrive_link"] + + except Exception as e: + return f"ERROR: Unable to Extract GDrive Link - {e.__class__.__name__}" diff --git a/src/sites/bypasser/gdtot.py b/src/sites/bypasser/gdtot.py new file mode 100644 index 00000000..78a79cab --- /dev/null +++ b/src/sites/bypasser/gdtot.py @@ -0,0 +1,74 @@ +""" +GDTot bypasser +""" + +import re +from urllib.parse import urlparse +from cfscrape import create_scraper +from lxml import etree + +# Site configuration +SITE_NAME = "GDTot" +URL_PATTERNS = [ + r'gdtot\.cloud/', + r'gdtot\.eu/', + r'gdtot\.me/' +] + +def gdtot_bypass(url): + """ + Bypass GDTot short links + """ + try: + cget = create_scraper().request + + try: + res = cget("GET", f'https://gdbot.xyz/file/{url.split("/")[-1]}') + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + token_url = etree.HTML(res.content).xpath( + "//a[contains(@class,'inline-flex items-center justify-center')]/@href" + ) + + if not token_url: + try: + url = cget("GET", url).url + p_url = urlparse(url) + res = cget( + "GET", f"{p_url.scheme}://{p_url.hostname}/ddl/{url.split('/')[-1]}" + ) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + if ( + drive_link := re.findall(r"myDl\('(.*?)'\)", res.text) + ) and "drive.google.com" in drive_link[0]: + return drive_link[0] + else: + return "ERROR: Drive Link not found, Try in your browser" + + token_url = token_url[0] + + try: + token_page = cget("GET", token_url) + except Exception as e: + return f"ERROR: {e.__class__.__name__} with {token_url}" + + path = re.findall('\("(.*?)"\)', token_page.text) + if not path: + return "ERROR: Cannot bypass this GDTot link" + + path = path[0] + raw = urlparse(token_url) + final_url = f"{raw.scheme}://{raw.hostname}{path}" + + # Note: This references ddl module which would need to be imported + # For now returning the direct URL + return final_url + + except Exception as e: + return f"Error bypassing GDTot: {str(e)}" + +# Common export function name +process_url = gdtot_bypass diff --git a/src/sites/bypasser/gplinks.py b/src/sites/bypasser/gplinks.py new file mode 100644 index 00000000..59c226c2 --- /dev/null +++ b/src/sites/bypasser/gplinks.py @@ -0,0 +1,57 @@ +""" +GPlinks bypasser +""" + +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "GPlinks" +URL_PATTERNS = [ + r'gplinks\.co/', + r'gplinks\.in/', + r'gplinks\.com/' +] + +def gplinks_bypass(url): + """ + Bypass GPlinks short links + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + token = url.split("/")[-1] + domain = "https://gplinks.co/" + referer = "https://mynewsmedia.co/" + + # Get redirect URL + location_response = client.get(url, allow_redirects=False) + if "Location" not in location_response.headers: + return "Error: No redirect found in GPlinks URL" + + vid = location_response.headers["Location"].split("=")[-1] + url = f"{url}/?{vid}" + + response = client.get(url, allow_redirects=False) + soup = BeautifulSoup(response.content, "html.parser") + + go_link_elem = soup.find(id="go-link") + if not go_link_elem: + return "Error: Could not find go-link element in GPlinks page" + + inputs = go_link_elem.find_all(name="input") + data = {input.get("name"): input.get("value") for input in inputs} + + time.sleep(10) + headers = {"x-requested-with": "XMLHttpRequest"} + + bypassed_response = client.post(domain + "links/go", data=data, headers=headers) + bypassed_url = bypassed_response.json()["url"] + + return bypassed_url + + except Exception as e: + return f"Error bypassing GPlinks: {str(e)}" + +# Common export function name +process_url = gplinks_bypass diff --git a/src/sites/bypasser/gyanilinks.py b/src/sites/bypasser/gyanilinks.py new file mode 100644 index 00000000..5c8799bb --- /dev/null +++ b/src/sites/bypasser/gyanilinks.py @@ -0,0 +1,49 @@ +""" +Gyanilinks bypasser +""" + +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Gyanilinks" +URL_PATTERNS = [ + r'gyanilinks\.com/', + r'go\.hipsonyc\.com/', + r'gtlinks\.me/' +] + +def gyanilinks_bypass(url): + """ + Bypass Gyanilinks short links + """ + try: + DOMAIN = "https://go.hipsonyc.com/" + client = cloudscraper.create_scraper(allow_brotli=False) + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + resp = client.get(final_url) + soup = BeautifulSoup(resp.content, "html.parser") + + try: + inputs = soup.find(id="go-link").find_all(name="input") + except: + return "Incorrect Gyanilinks URL" + + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(5) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return "Something went wrong with Gyanilinks bypass" + + except Exception as e: + return f"Error bypassing Gyanilinks: {str(e)}" + +# Common export function name +process_url = gyanilinks_bypass diff --git a/src/sites/bypasser/htpmovies.py b/src/sites/bypasser/htpmovies.py new file mode 100644 index 00000000..a9049a3d --- /dev/null +++ b/src/sites/bypasser/htpmovies.py @@ -0,0 +1,53 @@ +"""HTSMovies URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "HTSMovies" +URL_PATTERNS = [r"htpmovies\.", r"htsmovies\."] + +def process_url(link: str) -> str: + """Bypass HTSMovies shortened URLs + + Args: + link: HTSMovies shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + r = client.get(link, allow_redirects=True).text + j = r.split('("')[-1] + url = j.split('")')[0] + param = url.split("/")[-1] + + DOMAIN = "https://go.theforyou.in" + final_url = f"{DOMAIN}/{param}" + resp = client.get(final_url) + soup = BeautifulSoup(resp.content, "html.parser") + + try: + inputs = soup.find(id="go-link").find_all(name="input") + except Exception: + return "Incorrect Link" + + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(10) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went Wrong !!" diff --git a/src/sites/bypasser/igggames.py b/src/sites/bypasser/igggames.py new file mode 100644 index 00000000..868c6181 --- /dev/null +++ b/src/sites/bypasser/igggames.py @@ -0,0 +1,85 @@ +"""IGG-Games URL bypasser module""" + +import requests + +try: + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + BeautifulSoup = None + +SITE_NAME = "IGG-Games" +URL_PATTERNS = [r"igg-games\.com"] + +def bypassBluemediafiles(url, torrent=False): + """Helper function to bypass bluemediafiles""" + try: + if torrent: + # Handle torrent links differently if needed + return url + return url # Simplified for now + except Exception: + return url + +def process_url(url: str) -> str: + """Extract download links from IGG-Games pages + + Args: + url: IGG-Games URL + + Returns: + Formatted download links or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (beautifulsoup4) not available" + + try: + res = requests.get(url) + soup = BeautifulSoup(res.text, "html.parser") + soup = soup.find("div", class_="uk-margin-medium-top").findAll("a") + + bluelist = [] + for ele in soup: + bluelist.append(ele.get("href")) + bluelist = bluelist[3:-1] + + links = "" + last = None + fix = True + + for ele in bluelist: + if ele == "https://igg-games.com/how-to-install-a-pc-game-and-update.html": + fix = False + links += "\\n" + if "bluemediafile" in ele: + tmp = bypassBluemediafiles(ele) + if fix: + tt = tmp.split("/")[2] + if last is not None and tt != last: + links += "\\n" + last = tt + links = links + "○ " + tmp + "\\n" + elif "pcgamestorrents.com" in ele: + res = requests.get(ele) + soup = BeautifulSoup(res.text, "html.parser") + turl = ( + soup.find( + "p", class_="uk-card uk-card-body uk-card-default uk-card-hover" + ) + .find("a") + .get("href") + ) + links = links + "🧲 `" + bypassBluemediafiles(turl, True) + "`\\n\\n" + elif ele != "https://igg-games.com/how-to-install-a-pc-game-and-update.html": + if fix: + tt = ele.split("/")[2] + if last is not None and tt != last: + links += "\\n" + last = tt + links = links + "○ " + ele + "\\n" + + return links[:-1] if links else "ERROR: No download links found" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/index_scraper.py b/src/sites/bypasser/index_scraper.py new file mode 100644 index 00000000..a01f2a49 --- /dev/null +++ b/src/sites/bypasser/index_scraper.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Index scraper +Scrapes index links with authentication + +Site: Index directories +Method: Authenticated API requests with token pagination +""" + +import base64 +import json +from urllib.parse import quote + +try: + import requests + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "index_scraper" +URL_PATTERNS = [ + r'index', # Generic pattern for index links + r'directory' +] + +def authorization_token(username, password): + """Generate authorization token for index access""" + user_pass = f"{username}:{password}" + return f"Basic {base64.b64encode(user_pass.encode()).decode()}" + +def decrypt(string): + """Decrypt index response""" + return base64.b64decode(string[::-1][24:-20]).decode("utf-8") + +def process_url(url: str, username="none", password="none") -> str: + """ + Scrape index directory + + Args: + url: Index directory URL + username: Authentication username + password: Authentication password + + Returns: + Formatted file listing or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: requests module not available" + + def func(payload_input, url, username, password): + next_page = False + next_page_token = "" + + url = f"{url}/" if url[-1] != "/" else url + + try: + headers = {"authorization": authorization_token(username, password)} + except: + return "username/password combination is wrong", None, None + + encrypted_response = requests.post(url, data=payload_input, headers=headers) + if encrypted_response.status_code == 401: + return "username/password combination is wrong", None, None + + try: + decrypted_response = json.loads(decrypt(encrypted_response.text)) + except: + return ( + "something went wrong. check index link/username/password field again", + None, + None, + ) + + page_token = decrypted_response["nextPageToken"] + if page_token is None: + next_page = False + else: + next_page = True + next_page_token = page_token + + if list(decrypted_response.get("data").keys())[0] != "error": + file_length = len(decrypted_response["data"]["files"]) + result = "" + + for i, _ in enumerate(range(file_length)): + files_type = decrypted_response["data"]["files"][i]["mimeType"] + if files_type != "application/vnd.google-apps.folder": + files_name = decrypted_response["data"]["files"][i]["name"] + direct_download_link = url + quote(files_name) + result += f"• {files_name} :\n{direct_download_link}\n\n" + return result, next_page, next_page_token + + def format_results(result): + long_string = "".join(result) + new_list = [] + + while len(long_string) > 0: + if len(long_string) > 4000: + split_index = long_string.rfind("\n\n", 0, 4000) + if split_index == -1: + split_index = 4000 + else: + split_index = len(long_string) + + new_list.append(long_string[:split_index]) + long_string = long_string[split_index:].lstrip("\n\n") + + return new_list + + try: + # Main processing + x = 0 + next_page = False + next_page_token = "" + result = [] + + payload = {"page_token": next_page_token, "page_index": x} + temp, next_page, next_page_token = func(payload, url, username, password) + if temp is not None: + result.append(temp) + + while next_page == True: + payload = {"page_token": next_page_token, "page_index": x} + temp, next_page, next_page_token = func(payload, url, username, password) + if temp is not None: + result.append(temp) + x += 1 + + if len(result) == 0: + return "ERROR: No files found in index" + + formatted_results = format_results(result) + return "\n".join(formatted_results) + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/indi.py b/src/sites/bypasser/indi.py new file mode 100644 index 00000000..18595791 --- /dev/null +++ b/src/sites/bypasser/indi.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Indi bypasser (Indian shortener) +Bypasses file.earnash.com links (indiurl) + +Site: file.earnash.com (indiurl) +Method: Form submission with 10-second delay +""" + +import time +try: + import requests + from bs4 import BeautifulSoup + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "indi" +URL_PATTERNS = [ + r'file\.earnash\.com', + r'indiurl\.cordtpoint\.co\.in' +] + +def process_url(url: str) -> str: + """ + Bypass indi/indiurl URLs + + Args: + url: file.earnash.com or indiurl URL + + Returns: + Bypassed URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: requests and bs4 modules not available" + + try: + client = requests.session() + DOMAIN = "https://file.earnash.com/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://indiurl.cordtpoint.co.in/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + + time.sleep(10) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + try: + return r.json()["url"] + except: + return "ERROR: Failed to extract URL from JSON response" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/indianshortner.py b/src/sites/bypasser/indianshortner.py new file mode 100644 index 00000000..ad755699 --- /dev/null +++ b/src/sites/bypasser/indianshortner.py @@ -0,0 +1,49 @@ +"""IndianShortner URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "IndianShortner" +URL_PATTERNS = [r"indianshortner\."] + +def process_url(url: str) -> str: + """Bypass IndianShortner shortened URLs + + Args: + url: IndianShortner shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://indianshortner.com/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://moddingzone.in/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(5) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/kingurl.py b/src/sites/bypasser/kingurl.py new file mode 100644 index 00000000..92ae2514 --- /dev/null +++ b/src/sites/bypasser/kingurl.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Kingurl bypasser +Supports both kingurl.in variants + +Sites: go.kingurl.in, earn.bankshiksha.in +Methods: Form submission for go.kingurl.in, direct redirect for bankshiksha +""" + +import time +try: + from cloudscraper import create_scraper + from bs4 import BeautifulSoup + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "kingurl" +URL_PATTERNS = [ + r'kingurl\.in', + r'bankshiksha\.in' +] + +def process_url(url: str) -> str: + """ + Bypass kingurl.in links + + Args: + url: kingurl.in URL + + Returns: + Bypassed URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: cloudscraper and bs4 modules not available" + + try: + if "go.kingurl.in" in url: + return kingurl1_bypass(url) + else: + return kingurl_bypass(url) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + +def kingurl1_bypass(url: str) -> str: + """Bypass go.kingurl.in links with form submission""" + client = create_scraper(allow_brotli=False) + DOMAIN = "https://go.kingurl.in/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://earnbox.bankshiksha.in/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + + time.sleep(7) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + try: + return str(r.json()["url"]) + except: + return "ERROR: Failed to extract URL from JSON response" + +def kingurl_bypass(url: str) -> str: + """Bypass earn.bankshiksha.in links with direct redirect""" + DOMAIN = "https://earn.bankshiksha.in/click.php?LinkShortUrlID" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}={code}" + return final_url diff --git a/src/sites/bypasser/krownlinks.py b/src/sites/bypasser/krownlinks.py new file mode 100644 index 00000000..ba4d492d --- /dev/null +++ b/src/sites/bypasser/krownlinks.py @@ -0,0 +1,49 @@ +"""Krownlinks URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "Krownlinks" +URL_PATTERNS = [r"krownlinks\."] + +def process_url(url: str) -> str: + """Bypass Krownlinks shortened URLs + + Args: + url: Krownlinks shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://go.bloggerishyt.in/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://www.techkhulasha.com/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(8) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return str(r.json()["url"]) + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/linkbnao.py b/src/sites/bypasser/linkbnao.py new file mode 100644 index 00000000..98c840bf --- /dev/null +++ b/src/sites/bypasser/linkbnao.py @@ -0,0 +1,49 @@ +"""Linkbnao URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "Linkbnao" +URL_PATTERNS = [r"linkbnao\."] + +def process_url(url: str) -> str: + """Bypass Linkbnao shortened URLs + + Args: + url: Linkbnao shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://vip.linkbnao.com" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://ffworld.xyz/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(2) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/linkvertise.py b/src/sites/bypasser/linkvertise.py new file mode 100644 index 00000000..73d25ace --- /dev/null +++ b/src/sites/bypasser/linkvertise.py @@ -0,0 +1,36 @@ +""" +Linkvertise bypasser +""" + +import requests +import re + +# Site configuration +SITE_NAME = "Linkvertise" +URL_PATTERNS = [ + r'linkvertise\.com/', + r'link-to\.net/', + r'linkvertise\.net/' +] + +def linkvertise_bypass(url): + """ + Bypass Linkvertise short links using bypass.pm service + """ + try: + params = { + "url": url, + } + + response = requests.get("https://bypass.pm/bypass2", params=params).json() + + if response["success"]: + return response["destination"] + else: + return response.get("msg", "Error bypassing Linkvertise") + + except Exception as e: + return f"Error bypassing Linkvertise: {str(e)}" + +# Common export function name +process_url = linkvertise_bypass diff --git a/src/sites/bypasser/lolshort.py b/src/sites/bypasser/lolshort.py new file mode 100644 index 00000000..88d75619 --- /dev/null +++ b/src/sites/bypasser/lolshort.py @@ -0,0 +1,45 @@ +""" +Lolshort bypasser +""" + +import time +import requests +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Lolshort" +URL_PATTERNS = [ + r'get\.lolshort\.tech/', + r'lolshort\.tech/' +] + +def lolshort_bypass(url): + """ + Bypass Lolshort short links + """ + try: + client = requests.session() + DOMAIN = "https://get.lolshort.tech/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://tech.animezia.com/" + h = {"referer": ref} + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(5) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return "Something went wrong with Lolshort bypass" + + except Exception as e: + return f"Error bypassing Lolshort: {str(e)}" + +# Common export function name +process_url = lolshort_bypass diff --git a/src/sites/bypasser/mdisk_api.py b/src/sites/bypasser/mdisk_api.py new file mode 100644 index 00000000..b452d8b0 --- /dev/null +++ b/src/sites/bypasser/mdisk_api.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Mdisk bypasser +Extracts direct download links from mdisk.me URLs + +Site: mdisk.me +Method: API-based download link extraction +""" + +try: + import requests + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "mdisk" +URL_PATTERNS = [ + r'mdisk\.me' +] + +def process_url(url: str) -> str: + """ + Extract download links from mdisk.me URLs + + Args: + url: mdisk.me URL + + Returns: + Download and source links or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: requests module not available" + + try: + header = { + "Accept": "*/*", + "Accept-Language": "en-US,en;q=0.5", + "Accept-Encoding": "gzip, deflate, br", + "Referer": "https://mdisk.me/", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36", + } + + inp = url + fxl = inp.split("/") + cid = fxl[-1] + + URL = f"https://diskuploader.entertainvideo.com/v1/file/cdnurl?param={cid}" + res = requests.get(url=URL, headers=header).json() + return res["download"] + "\n\n" + res["source"] + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/mdisklink.py b/src/sites/bypasser/mdisklink.py new file mode 100644 index 00000000..dcb8c83a --- /dev/null +++ b/src/sites/bypasser/mdisklink.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Mdisklink bypasser +Bypasses mdisklink.link short URLs + +Site: mdisklink.link +Method: Form submission with 2-second delay +""" + +import time +try: + from cloudscraper import create_scraper + from bs4 import BeautifulSoup + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "mdisklink" +URL_PATTERNS = [ + r'mdisklink\.link' +] + +def process_url(url: str) -> str: + """ + Bypass mdisklink.link URLs + + Args: + url: mdisklink.link URL + + Returns: + Bypassed URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: cloudscraper and bs4 modules not available" + + try: + client = create_scraper(allow_brotli=False) + DOMAIN = "https://mdisklink.link/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://m.proappapk.com/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + + time.sleep(2) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + try: + return r.json()["url"] + except: + return "ERROR: Failed to extract URL from JSON response" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/mdiskpro.py b/src/sites/bypasser/mdiskpro.py new file mode 100644 index 00000000..a242660b --- /dev/null +++ b/src/sites/bypasser/mdiskpro.py @@ -0,0 +1,46 @@ +"""MDisk Pro link bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "MDisk Pro" +URL_PATTERNS = [r"mdisk\.pro"] + +def process_url(url: str) -> str: + """Bypass MDisk Pro shortened URLs + + Args: + url: MDisk Pro shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://mdisk.pro" + ref = "https://m.meclipstudy.in/" + h = {"referer": ref} + + try: + resp = client.get(url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(8) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/mdiskshortners.py b/src/sites/bypasser/mdiskshortners.py new file mode 100644 index 00000000..269b94ea --- /dev/null +++ b/src/sites/bypasser/mdiskshortners.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Mdiskshortners bypasser +Bypasses mdiskshortners.in short URLs + +Site: mdiskshortners.in +Method: Form submission with 2-second delay +""" + +import time +try: + from cloudscraper import create_scraper + from bs4 import BeautifulSoup + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "mdiskshortners" +URL_PATTERNS = [ + r'mdiskshortners\.in' +] + +def process_url(url: str) -> str: + """ + Bypass mdiskshortners.in URLs + + Args: + url: mdiskshortners.in URL + + Returns: + Bypassed URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: cloudscraper and bs4 modules not available" + + try: + client = create_scraper(allow_brotli=False) + DOMAIN = "https://mdiskshortners.in/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://www.adzz.in/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + + time.sleep(2) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + try: + return r.json()["url"] + except: + return "ERROR: Failed to extract URL from JSON response" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/mdisky.py b/src/sites/bypasser/mdisky.py new file mode 100644 index 00000000..020900f7 --- /dev/null +++ b/src/sites/bypasser/mdisky.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Mdisky bypasser +Bypasses mdisky.link short URLs + +Site: mdisky.link +Method: Form submission with 6-second delay +""" + +import time +try: + from cloudscraper import create_scraper + from bs4 import BeautifulSoup + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "mdisky" +URL_PATTERNS = [ + r'mdisky\.link' +] + +def process_url(url: str) -> str: + """ + Bypass mdisky.link URLs + + Args: + url: mdisky.link URL + + Returns: + Bypassed URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: cloudscraper and bs4 modules not available" + + try: + client = create_scraper(allow_brotli=False) + DOMAIN = "https://go.bloggingaro.com/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://www.bloggingaro.com/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + + time.sleep(6) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + try: + return str(r.json()["url"]) + except: + return "ERROR: Failed to extract URL from JSON response" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/moneykamalo.py b/src/sites/bypasser/moneykamalo.py new file mode 100644 index 00000000..2d297ebf --- /dev/null +++ b/src/sites/bypasser/moneykamalo.py @@ -0,0 +1,45 @@ +""" +MoneyKamalo bypasser +""" + +import time +import requests +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "MoneyKamalo" +URL_PATTERNS = [ + r'go\.moneykamalo\.com/', + r'moneykamalo\.com/' +] + +def moneykamalo_bypass(url): + """ + Bypass MoneyKamalo short links + """ + try: + client = requests.session() + DOMAIN = "https://go.moneykamalo.com" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://bloging.techkeshri.com/" + h = {"referer": ref} + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(5) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return "Something went wrong with MoneyKamalo bypass" + + except Exception as e: + return f"Error bypassing MoneyKamalo: {str(e)}" + +# Common export function name +process_url = moneykamalo_bypass diff --git a/src/sites/bypasser/olamovies.py b/src/sites/bypasser/olamovies.py new file mode 100644 index 00000000..d12a780e --- /dev/null +++ b/src/sites/bypasser/olamovies.py @@ -0,0 +1,51 @@ +""" +OlaMovies bypasser +""" + +import requests +import re + +# Site configuration +SITE_NAME = "OlaMovies" +URL_PATTERNS = [ + r'olamovies\.', + r'olamoviesstatus\.' +] + +def bypass_olamovies(url): + """ + Bypass OlaMovies links + """ + try: + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' + } + + response = requests.get(url, headers=headers, timeout=15) + response.raise_for_status() + + # Extract the actual link from OlaMovies page + # Usually it's in a form or hidden input + content = response.text + + # Look for actual download/bypass link patterns + link_patterns = [ + r'location\.href\s*=\s*["\']([^"\']+)["\']', + r'window\.open\s*\(\s*["\']([^"\']+)["\']', + r'href\s*=\s*["\']([^"\']+)["\'].*?(?:download|bypass|continue)' + ] + + for pattern in link_patterns: + match = re.search(pattern, content, re.IGNORECASE) + if match: + result_url = match.group(1) + if result_url.startswith('http'): + return result_url + + return f"Could not extract link from OlaMovies: {url}" + + except Exception as e: + return f"Error bypassing OlaMovies: {str(e)}" + +# Common export function name +process_url = bypass_olamovies diff --git a/src/sites/bypasser/onepagelink.py b/src/sites/bypasser/onepagelink.py new file mode 100644 index 00000000..09513dab --- /dev/null +++ b/src/sites/bypasser/onepagelink.py @@ -0,0 +1,49 @@ +"""OnePageLink URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "OnePageLink" +URL_PATTERNS = [r"onepagelink\."] + +def process_url(url: str) -> str: + """Bypass OnePageLink shortened URLs + + Args: + url: OnePageLink shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "go.onepagelink.in" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"https://{DOMAIN}/{code}" + ref = "https://gorating.in/" + h = {"referer": ref} + + response = client.get(final_url, headers=h) + soup = BeautifulSoup(response.text, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(5) + r = client.post(f"https://{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/ouo.py b/src/sites/bypasser/ouo.py new file mode 100644 index 00000000..58b3ef5a --- /dev/null +++ b/src/sites/bypasser/ouo.py @@ -0,0 +1,73 @@ +""" +Ouo bypasser +""" + +import re +import requests +from urllib.parse import urlparse +from bs4 import BeautifulSoup +from core.utils import RecaptchaV3 + +# Site configuration +SITE_NAME = "Ouo" +URL_PATTERNS = [ + r'ouo\.press/', + r'ouo\.io/' +] + +def ouo_bypass(url): + """ + Bypass Ouo short links + Code from https://github.com/xcscxr/ouo-bypass/ + """ + try: + tempurl = url.replace("ouo.press", "ouo.io") + p = urlparse(tempurl) + id = tempurl.split("/")[-1] + + headers = { + "authority": "ouo.io", + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", + "accept-language": "en-GB,en-US;q=0.9,en;q=0.8", + "cache-control": "max-age=0", + "referer": "http://www.google.com/ig/adde?moduleurl=", + "upgrade-insecure-requests": "1", + } + + client = requests.Session() + client.headers.update(headers) + + res = client.get(tempurl) + next_url = f"{p.scheme}://{p.hostname}/go/{id}" + + for _ in range(2): + if res.headers.get("Location"): + break + + bs4 = BeautifulSoup(res.content, "lxml") + + # Find the form inputs + form = bs4.find("form") + if not form: + return "Error: No form found in Ouo page" + + inputs = form.findAll("input", {"name": re.compile(r"token$")}) + data = {input.get("name"): input.get("value") for input in inputs} + data["x-token"] = RecaptchaV3() + + header = {"content-type": "application/x-www-form-urlencoded"} + res = client.post( + next_url, + data=data, + headers=header, + allow_redirects=False, + ) + next_url = f"{p.scheme}://{p.hostname}/xreallcygo/{id}" + + return res.headers.get("Location", "Error: No redirect location found") + + except Exception as e: + return f"Error bypassing Ouo: {str(e)}" + +# Common export function name +process_url = ouo_bypass diff --git a/src/sites/bypasser/pdisk.py b/src/sites/bypasser/pdisk.py new file mode 100644 index 00000000..a0a029d9 --- /dev/null +++ b/src/sites/bypasser/pdisk.py @@ -0,0 +1,49 @@ +""" +Pdisk bypasser +""" + +import requests +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Pdisk" +URL_PATTERNS = [ + r'pdisk\.pro/', + r'pdisk\.me/', + r'pdisk\.net/' +] + +def pdisk_bypass(url): + """ + Bypass Pdisk links to get direct video URLs + """ + try: + response = requests.get(url) + content = response.text + + # Try to extract from HTML comment + try: + direct_url = content.split("")[0] + if direct_url and direct_url.startswith("http"): + return direct_url + except: + pass + + # Try to extract from video source tag + try: + soup = BeautifulSoup(content, "html.parser") + video_elem = soup.find("video") + if video_elem: + source_elem = video_elem.find("source") + if source_elem and source_elem.get("src"): + return source_elem.get("src") + except: + pass + + return "Could not extract direct URL from Pdisk link" + + except Exception as e: + return f"Error bypassing Pdisk: {str(e)}" + +# Common export function name +process_url = pdisk_bypass diff --git a/src/sites/bypasser/pixl.py b/src/sites/bypasser/pixl.py new file mode 100644 index 00000000..4efa702b --- /dev/null +++ b/src/sites/bypasser/pixl.py @@ -0,0 +1,74 @@ +""" +Pixl.is bypasser +""" + +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Pixl" +URL_PATTERNS = [ + r'pixl\.is/' +] + +def pixl_bypass(url): + """ + Bypass Pixl.is image/album links + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + resp = client.get(url) + + if resp.status_code == 404: + return "File not found/The link you entered is wrong!" + + soup = BeautifulSoup(resp.content, "html.parser") + + # Handle album links + if "album" in url: + dl_msg = "" + count = 1 + + totalimages_elem = soup.find("span", {"data-text": "image-count"}) + if totalimages_elem: + totalimages = totalimages_elem.text + dl_msg += f"Album contains {totalimages} images:\n\n" + + thmbnailanch = soup.findAll(attrs={"class": "--media"}) + + for ref in thmbnailanch: + if count > 10: # Limit to avoid excessive processing + dl_msg += f"... and {len(thmbnailanch) - 10} more images" + break + + try: + imgdata = client.get(ref.attrs["href"]) + if not imgdata.status_code == 200: + time.sleep(2) + continue + + imghtml = BeautifulSoup(imgdata.text, "html.parser") + downloadanch = imghtml.find(attrs={"class": "btn-download"}) + + if downloadanch and downloadanch.attrs.get("href"): + currentimg = downloadanch.attrs["href"].replace(" ", "%20") + dl_msg += f"{count}. {currentimg}\n" + count += 1 + except: + continue + + return dl_msg if dl_msg else "No images found in Pixl album" + else: + # Handle single image + downloadanch = soup.find(attrs={"class": "btn-download"}) + if downloadanch and downloadanch.attrs.get("href"): + return downloadanch.attrs["href"].replace(" ", "%20") + else: + return "Could not find download link for Pixl image" + + except Exception as e: + return f"Error bypassing Pixl: {str(e)}" + +# Common export function name +process_url = pixl_bypass diff --git a/src/sites/bypasser/psa.py b/src/sites/bypasser/psa.py new file mode 100644 index 00000000..89008915 --- /dev/null +++ b/src/sites/bypasser/psa.py @@ -0,0 +1,67 @@ +""" +PSA bypasser +""" + +import requests +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "PSA" +URL_PATTERNS = [ + r'psa\.wf/', + r'psa\.pm/' +] + +def psa_bypass(psa_url): + """ + Bypass PSA (Protected Shortened URLs) + """ + try: + headers = { + "authority": "psa.wf", + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", + "accept-language": "en-US,en;q=0.9", + "referer": "https://psa.wf/", + "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36", + } + + r = requests.get(psa_url, headers=headers) + soup = BeautifulSoup(r.text, "html.parser") + + # Find protected content boxes + content_boxes = soup.find_all( + class_="dropshadowboxes-drop-shadow dropshadowboxes-rounded-corners dropshadowboxes-inside-and-outside-shadow dropshadowboxes-lifted-both dropshadowboxes-effect-default" + ) + + if not content_boxes: + return "No protected content found in PSA link" + + links = [] + for link in content_boxes: + try: + exit_gate = link.a.get("href") + if "/exit" in exit_gate: + # Extract the actual URL from exit gate + if "url=" in exit_gate: + actual_url = exit_gate.split("url=")[-1] + links.append(actual_url) + else: + links.append(exit_gate) + except: + pass + + if not links: + return "No extractable links found in PSA content" + + # Format the result + result = f"PSA Content ({len(links)} links found):\n\n" + for i, link in enumerate(links, 1): + result += f"{i}. {link}\n" + + return result + + except Exception as e: + return f"Error bypassing PSA: {str(e)}" + +# Common export function name +process_url = psa_bypass diff --git a/src/sites/bypasser/rocklinks.py b/src/sites/bypasser/rocklinks.py new file mode 100644 index 00000000..941b5a49 --- /dev/null +++ b/src/sites/bypasser/rocklinks.py @@ -0,0 +1,60 @@ +""" +RockLinks bypasser +""" + +import requests +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "RockLinks" +URL_PATTERNS = [ + r'rocklinks\.net/', + r'link\.urlwash\.org/' +] + +def rocklinks_bypass(url): + """ + Bypass RockLinks URLs + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + + if "rocklinks.net" in url: + DOMAIN = "https://blog.rocklinks.net" + else: + DOMAIN = "https://link.urlwash.org" + + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + + if "rocklinks.net" in url: + final_url = f"{DOMAIN}/{code}?quelle=" + else: + final_url = f"{DOMAIN}/{code}" + + resp = client.get(final_url) + soup = BeautifulSoup(resp.content, "html.parser") + + try: + inputs = soup.find(id="go-link").find_all(name="input") + except: + return f"Could not find form in RockLinks page: {url}" + + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + + time.sleep(10) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return f"Could not extract RockLinks URL: {url}" + + except Exception as e: + return f"Error bypassing RockLinks: {str(e)}" + +# Common export function name +process_url = rocklinks_bypass diff --git a/src/sites/bypasser/rslinks.py b/src/sites/bypasser/rslinks.py new file mode 100644 index 00000000..ce1c18db --- /dev/null +++ b/src/sites/bypasser/rslinks.py @@ -0,0 +1,25 @@ +"""RSLinks URL bypasser module""" + +import requests + +SITE_NAME = "RSLinks" +URL_PATTERNS = [r"rslinks\."] + +def process_url(url: str) -> str: + """Bypass RSLinks shortened URLs + + Args: + url: RSLinks shortened URL + + Returns: + Original URL or error message + """ + try: + client = requests.session() + download = requests.get(url, stream=True, allow_redirects=False) + v = download.headers["location"] + code = v.split("ms9")[-1] + final = f"http://techyproio.blogspot.com/p/short.html?{code}==" + return final + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/scrappers.py b/src/sites/bypasser/scrappers.py new file mode 100644 index 00000000..f8d03bd9 --- /dev/null +++ b/src/sites/bypasser/scrappers.py @@ -0,0 +1,87 @@ +""" +Multi-site scraper bypasser +""" + +import re +import requests +from bs4 import BeautifulSoup +from urllib.parse import unquote + +# Site configuration +SITE_NAME = "Scrappers" +URL_PATTERNS = [ + r'sharespark\.', + r'htpmovies\.', + r'cinevood\.', + r'atishmkv\.', + r'teluguflix\.', + r'taemovies\.', + r'toonworld4all\.', + r'animeremux\.' +] + +def scrappers_bypass(link): + """ + Multi-site scraper for various movie/content sites + """ + try: + # Validate link format + try: + link = re.match( + r"((http|https)\:\/\/)?[a-zA-Z0-9\.\/\?\:@\-_=#]+\.([a-zA-Z]){2,6}([a-zA-Z0-9\.\&\/\?\:@\-_=#])*", + link, + )[0] + except (TypeError, AttributeError): + return "Not a Valid Link." + + if "htpmovies" in link and "/exit.php" in link: + # Handle direct exit links + return f"HTMovies exit link: {link}" + + elif "teluguflix" in link: + gd_txt = "" + r = requests.get(link) + soup = BeautifulSoup(r.text, "html.parser") + links = soup.select('a[href*="gdtot"]') + gd_txt = f"Total Links Found : {len(links)}\n\n" + + for no, link_elem in enumerate(links[:10], start=1): # Limit to 10 + gdlk = link_elem["href"] + try: + t = requests.get(gdlk, timeout=10) + soupt = BeautifulSoup(t.text, "html.parser") + title = soupt.select('meta[property^="og:description"]') + title_text = title[0]['content'].replace('Download ', '') if title else "Unknown" + gd_txt += f"{no}. {title_text}\n{gdlk}\n\n" + except: + gd_txt += f"{no}. {gdlk}\n\n" + + return gd_txt + + elif "atishmkv" in link: + prsd = "" + r = requests.get(link) + soup = BeautifulSoup(r.text, "html.parser") + x = soup.select('a[href^="https://gdflix.top/file"]') + + for a in x: + prsd += a["href"] + "\n\n" + return prsd if prsd else "No GDFlix links found" + + else: + # Generic magnet link extractor + res = requests.get(link) + soup = BeautifulSoup(res.text, "html.parser") + magnet_links = soup.select(r'a[href^="magnet:?xt=urn:btih:"]') + + if magnet_links: + links = [hy["href"] for hy in magnet_links] + return "\n\n".join(links) + else: + return f"No supported content found for: {link}" + + except Exception as e: + return f"Error scraping site: {str(e)}" + +# Common export function name +process_url = scrappers_bypass diff --git a/src/sites/bypasser/sharer.py b/src/sites/bypasser/sharer.py new file mode 100644 index 00000000..d20440df --- /dev/null +++ b/src/sites/bypasser/sharer.py @@ -0,0 +1,77 @@ +""" +Sharer bypasser +""" + +import re +import cloudscraper +from lxml import etree + +# Site configuration +SITE_NAME = "Sharer" +URL_PATTERNS = [ + r'sharer\.pw/', + r'sharer\.run/', + r'sharer\.link/' +] + +def parse_info_sharer(res): + """ + Parse information from sharer page + """ + info_parsed = {} + title = re.findall('

(.*?)

', res.text) + info_parsed['title'] = title[0] if title else None + return info_parsed + +def sharer_bypass(url, Laravel_Session=None, XSRF_TOKEN=None): + """ + Bypass Sharer short links + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + + # Use provided credentials or empty fallback + if Laravel_Session and XSRF_TOKEN: + client.cookies.update( + {"XSRF-TOKEN": XSRF_TOKEN, "laravel_session": Laravel_Session} + ) + + res = client.get(url) + + # Extract token + token_matches = re.findall("_token\s=\s'(.*?)'", res.text, re.DOTALL) + if not token_matches: + return "Error: Could not find authentication token" + + token = token_matches[0] + ddl_btn = etree.HTML(res.content).xpath("//button[@id='btndirect']") + + headers = { + "content-type": "application/x-www-form-urlencoded; charset=UTF-8", + "x-requested-with": "XMLHttpRequest", + } + + data = {"_token": token} + + # Try without login first + data["nl"] = 1 + + try: + res = client.post(url + "/dl", headers=headers, data=data).json() + except: + return "Error: Failed to get download link from Sharer" + + if "url" in res and res["url"]: + return res["url"] + + # If direct button exists and no login method worked + if len(ddl_btn): + return "Error: Sharer requires login credentials" + + return "Error: Could not bypass Sharer link" + + except Exception as e: + return f"Error bypassing Sharer: {str(e)}" + +# Common export function name +process_url = sharer_bypass diff --git a/src/sites/bypasser/shareus.py b/src/sites/bypasser/shareus.py new file mode 100644 index 00000000..c0ab0f6e --- /dev/null +++ b/src/sites/bypasser/shareus.py @@ -0,0 +1,45 @@ +""" +ShareUs bypasser +""" + +import requests + +# Site configuration +SITE_NAME = "ShareUs" +URL_PATTERNS = [ + r'shareus\.io/' +] + +def shareus_bypass(url): + """ + Bypass ShareUs short links + """ + try: + headers = { + "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", + } + DOMAIN = "https://us-central1-my-apps-server.cloudfunctions.net" + sess = requests.session() + + code = url.split("/")[-1] + params = { + "shortid": code, + "initial": "true", + "referrer": "https://shareus.io/", + } + response = requests.get(f"{DOMAIN}/v", params=params, headers=headers) + + for i in range(1, 4): + json_data = { + "current_page": i, + } + response = sess.post(f"{DOMAIN}/v", headers=headers, json=json_data) + + response = sess.get(f"{DOMAIN}/get_link", headers=headers).json() + return response["link_info"]["destination"] + + except Exception as e: + return f"Error bypassing ShareUs: {str(e)}" + +# Common export function name +process_url = shareus_bypass diff --git a/src/sites/bypasser/short2url.py b/src/sites/bypasser/short2url.py new file mode 100644 index 00000000..daf47fe7 --- /dev/null +++ b/src/sites/bypasser/short2url.py @@ -0,0 +1,45 @@ +""" +Short2url bypasser +""" + +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Short2url" +URL_PATTERNS = [ + r'short2url\.in/', + r'short2url\.com/' +] + +def short2url_bypass(url): + """ + Bypass Short2url short links + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://techyuth.xyz/blog" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://blog.coin2pay.xyz/" + h = {"referer": ref} + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(10) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return "Something went wrong with Short2url bypass" + + except Exception as e: + return f"Error bypassing Short2url: {str(e)}" + +# Common export function name +process_url = short2url_bypass diff --git a/src/sites/bypasser/shorte_st.py b/src/sites/bypasser/shorte_st.py new file mode 100644 index 00000000..1839b2df --- /dev/null +++ b/src/sites/bypasser/shorte_st.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Shorte.st (sh.st) bypasser +Bypasses shorte.st shortened URLs + +Site: sh.st (shorte.st) +Method: Session-based bypass with adSessionId extraction +""" + +import time +import re +from urllib.parse import urlparse + +try: + import requests + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "shorte_st" +URL_PATTERNS = [ + r'sh\.st', + r'shorte\.st' +] + +def process_url(url: str) -> str: + """ + Bypass sh.st/shorte.st URLs + + Args: + url: sh.st or shorte.st URL + + Returns: + Final destination URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: requests module not available" + + try: + client = requests.Session() + client.headers.update({"referer": url}) + p = urlparse(url) + + res = client.get(url) + + sess_id = re.findall(r"""sessionId(?:\s+)?:(?:\s+)?['|"](.*?)['|"]""", res.text)[0] + + final_url = f"{p.scheme}://{p.netloc}/shortest-url/end-adsession" + params = {"adSessionId": sess_id, "callback": "_"} + + time.sleep(5) # Important delay + + res = client.get(final_url, params=params) + dest_url = re.findall(r'"(.*?)"', res.text)[1].replace(r"\/", "/") + + return dest_url + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/shortingly.py b/src/sites/bypasser/shortingly.py new file mode 100644 index 00000000..c21ae411 --- /dev/null +++ b/src/sites/bypasser/shortingly.py @@ -0,0 +1,43 @@ +""" +Shortingly bypasser +""" + +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Shortingly" +URL_PATTERNS = [ + r'shortingly\.in/' +] + +def shortingly_bypass(url): + """ + Bypass Shortingly short links + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://shortingly.in" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://tech.gyanitheme.com/" + h = {"referer": ref} + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(5) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + try: + return r.json()["url"] + except: + return "Something went wrong with Shortingly bypass" + + except Exception as e: + return f"Error bypassing Shortingly: {str(e)}" + +# Common export function name +process_url = shortingly_bypass diff --git a/src/sites/bypasser/sirigan.py b/src/sites/bypasser/sirigan.py new file mode 100644 index 00000000..7e355795 --- /dev/null +++ b/src/sites/bypasser/sirigan.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Sirigan bypasser +Decodes base64-encoded URLs from sirigan links + +Site: sirigan (general base64 decoder) +Method: Recursive base64 decoding +""" + +import base64 + +# Site configuration +SITE_NAME = "sirigan" +URL_PATTERNS = [ + r'sirigan\.', + r'base64' # Generic pattern for base64-encoded URLs +] + +def process_url(url: str) -> str: + """ + Decode sirigan base64-encoded URLs + + Args: + url: Sirigan or base64-encoded URL + + Returns: + Decoded URL or error message + """ + try: + # Extract the encoded part after the = sign + url = url.split("=", maxsplit=1)[-1] + + # Recursively decode base64 until no more decoding possible + while True: + try: + decoded = base64.b64decode(url).decode("utf-8") + url = decoded + except: + break + + # Extract final URL if it contains url= parameter + final_url = url.split("url=")[-1] + return final_url + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/thinfi.py b/src/sites/bypasser/thinfi.py new file mode 100644 index 00000000..bf7c3adc --- /dev/null +++ b/src/sites/bypasser/thinfi.py @@ -0,0 +1,34 @@ +""" +Thinfi bypasser +""" + +import requests +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Thinfi" +URL_PATTERNS = [ + r'thinfi\.com/' +] + +def thinfi_bypass(url): + """ + Bypass Thinfi short links + """ + try: + response = requests.get(url) + soup = BeautifulSoup(response.content, "html.parser") + + # Find the first paragraph's link + p_tag = soup.find("p") + if p_tag and p_tag.find("a"): + direct_url = p_tag.find("a").get("href") + return direct_url if direct_url else "Could not extract link from Thinfi" + else: + return "Could not find link in Thinfi page structure" + + except Exception as e: + return f"Error bypassing Thinfi: {str(e)}" + +# Common export function name +process_url = thinfi_bypass diff --git a/src/sites/bypasser/tiny.py b/src/sites/bypasser/tiny.py new file mode 100644 index 00000000..6ce298a4 --- /dev/null +++ b/src/sites/bypasser/tiny.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Tiny/Tinyfy bypasser +Bypasses tinyfy.in short URLs + +Site: tinyfy.in +Method: Form submission with referrer from yotrickslog.tech +""" + +try: + import requests + from bs4 import BeautifulSoup + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "tiny" +URL_PATTERNS = [ + r'tinyfy\.in' +] + +def process_url(url: str) -> str: + """ + Bypass tinyfy.in URLs + + Args: + url: tinyfy.in URL + + Returns: + Bypassed URL or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: requests and bs4 modules not available" + + try: + client = requests.session() + DOMAIN = "https://tinyfy.in" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://www.yotrickslog.tech/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + try: + return r.json()["url"] + except: + return "ERROR: Failed to extract URL from JSON response" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/bypasser/tinyurl.py b/src/sites/bypasser/tinyurl.py new file mode 100644 index 00000000..2fc45525 --- /dev/null +++ b/src/sites/bypasser/tinyurl.py @@ -0,0 +1,25 @@ +""" +TinyURL bypasser - Simple URL shortener bypass +""" + +import requests + +# Site configuration +SITE_NAME = "TinyURL" +URL_PATTERNS = [ + r'tinyurl\.com/', + r'tinyurl\.com/[a-zA-Z0-9]+' +] + +def bypass_tinyurl(url): + """ + Bypass TinyURL shortened URLs + """ + try: + response = requests.head(url, allow_redirects=True, timeout=10) + return response.url + except Exception as e: + return f"Error bypassing TinyURL: {str(e)}" + +# Common export function name +process_url = bypass_tinyurl diff --git a/src/sites/bypasser/tnlink.py b/src/sites/bypasser/tnlink.py new file mode 100644 index 00000000..88f27820 --- /dev/null +++ b/src/sites/bypasser/tnlink.py @@ -0,0 +1,48 @@ +""" +TNLink bypasser +""" + +import requests +import time +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "TNLink" +URL_PATTERNS = [ + r'tnlink\.in/', + r'page\.tnlink\.in/' +] + +def tnlink_bypass(url): + """ + Bypass TNLink URLs + """ + try: + client = requests.session() + DOMAIN = "https://page.tnlink.in/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://usanewstoday.club/" + h = {"referer": ref} + + while len(client.cookies) == 0: + resp = client.get(final_url, headers=h) + + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(8) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + try: + return r.json()["url"] + except: + return f"Could not extract TNLink URL: {url}" + + except Exception as e: + return f"Error bypassing TNLink: {str(e)}" + +# Common export function name +process_url = tnlink_bypass diff --git a/src/sites/bypasser/tnshort.py b/src/sites/bypasser/tnshort.py new file mode 100644 index 00000000..23f334fc --- /dev/null +++ b/src/sites/bypasser/tnshort.py @@ -0,0 +1,49 @@ +"""TNShort URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "TNShort" +URL_PATTERNS = [r"tnshort\."] + +def process_url(url: str) -> str: + """Bypass TNShort shortened URLs + + Args: + url: TNShort shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://news.sagenews.in/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://movies.djnonstopmusic.in/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(8) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return str(r.json()["url"]) + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/tnvalue.py b/src/sites/bypasser/tnvalue.py new file mode 100644 index 00000000..9c5c8395 --- /dev/null +++ b/src/sites/bypasser/tnvalue.py @@ -0,0 +1,49 @@ +"""TNValue URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "TNValue" +URL_PATTERNS = [r"tnvalue\."] + +def process_url(url: str) -> str: + """Bypass TNValue shortened URLs + + Args: + url: TNValue shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://gadgets.webhostingtips.club/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://ladkibahin.com/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(12) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return str(r.json()["url"]) + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/try2link.py b/src/sites/bypasser/try2link.py new file mode 100644 index 00000000..baa11ac7 --- /dev/null +++ b/src/sites/bypasser/try2link.py @@ -0,0 +1,50 @@ +""" +Try2Link bypasser +""" + +import requests +import time +import cloudscraper +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Try2Link" +URL_PATTERNS = [ + r'try2link\.com/', + r'try2link\.net/' +] + +def try2link_bypass(url): + """ + Bypass Try2Link URLs + """ + try: + client = cloudscraper.create_scraper(allow_brotli=False) + + url = url[:-1] if url[-1] == "/" else url + + params = (("d", int(time.time()) + (60 * 4)),) + r = client.get(url, params=params, headers={"Referer": "https://newforex.online/"}) + + soup = BeautifulSoup(r.text, "html.parser") + inputs = soup.find(id="go-link").find_all(name="input") + data = {input.get("name"): input.get("value") for input in inputs} + time.sleep(7) + + headers = { + "Host": "try2link.com", + "X-Requested-With": "XMLHttpRequest", + "Origin": "https://try2link.com", + "Referer": url, + } + + bypassed_url = client.post( + "https://try2link.com/links/go", headers=headers, data=data + ) + return bypassed_url.json()["url"] + + except Exception as e: + return f"Error bypassing Try2Link: {str(e)}" + +# Common export function name +process_url = try2link_bypass diff --git a/src/sites/bypasser/urlsopen.py b/src/sites/bypasser/urlsopen.py new file mode 100644 index 00000000..2176918b --- /dev/null +++ b/src/sites/bypasser/urlsopen.py @@ -0,0 +1,49 @@ +"""URLSOpen URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "URLSOpen" +URL_PATTERNS = [r"urlsopen\."] + +def process_url(url: str) -> str: + """Bypass URLSOpen shortened URLs + + Args: + url: URLSOpen shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://blogpost.viewboonposts.com/e998933f1f665f5e75f2d1ae0009e0063ed66f889000" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://blog.textpage.xyz/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(2) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/vipurl.py b/src/sites/bypasser/vipurl.py new file mode 100644 index 00000000..f010a796 --- /dev/null +++ b/src/sites/bypasser/vipurl.py @@ -0,0 +1,49 @@ +"""VipURL link bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "VipURL" +URL_PATTERNS = [r"vipurl\."] + +def process_url(url: str) -> str: + """Bypass VipURL shortened URLs + + Args: + url: VipURL shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://count.vipurl.in/" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://ezeviral.com/" + h = {"referer": ref} + + response = client.get(final_url, headers=h) + soup = BeautifulSoup(response.text, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(9) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/vnshortener.py b/src/sites/bypasser/vnshortener.py new file mode 100644 index 00000000..6cd51d2c --- /dev/null +++ b/src/sites/bypasser/vnshortener.py @@ -0,0 +1,69 @@ +"""VNShortener URL bypasser module""" + +import time +import requests + +try: + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + BeautifulSoup = None + +SITE_NAME = "VNShortener" +URL_PATTERNS = [r"vnshortener\."] + +def process_url(url: str) -> str: + """Bypass VNShortener shortened URLs + + Args: + url: VNShortener shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (beautifulsoup4) not available" + + try: + sess = requests.session() + DOMAIN = "https://vnshortener.com/" + org = "https://nishankhatri.xyz" + PhpAcc = DOMAIN + "link/new.php" + ref = "https://nishankhatri.com.np/" + go = DOMAIN + "links/go" + + code = url.split("/")[3] + final_url = f"{DOMAIN}/{code}/" + headers = {"authority": DOMAIN, "origin": org} + + data = { + "step_1": code, + } + response = sess.post(PhpAcc, headers=headers, data=data).json() + id = response["inserted_data"]["id"] + + data = { + "step_2": code, + "id": id, + } + response = sess.post(PhpAcc, headers=headers, data=data).json() + + headers["referer"] = ref + params = {"sid": str(id)} + resp = sess.get(final_url, params=params, headers=headers) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + time.sleep(1) + headers["x-requested-with"] = "XMLHttpRequest" + + r = sess.post(go, data=data, headers=headers).json() + if r["status"] == "success": + return r["url"] + else: + return "ERROR: Failed to bypass" + + except Exception: + return "Something went wrong :(" diff --git a/src/sites/bypasser/xpshort.py b/src/sites/bypasser/xpshort.py new file mode 100644 index 00000000..7c434103 --- /dev/null +++ b/src/sites/bypasser/xpshort.py @@ -0,0 +1,49 @@ +"""XPShort URL bypasser module""" + +import time + +try: + import cloudscraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + cloudscraper = None + BeautifulSoup = None + +SITE_NAME = "XPShort" +URL_PATTERNS = [r"xpshort\.", r"techymozo\."] + +def process_url(url: str) -> str: + """Bypass XPShort shortened URLs + + Args: + url: XPShort shortened URL + + Returns: + Original URL or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + try: + client = cloudscraper.create_scraper(allow_brotli=False) + DOMAIN = "https://xpshort.com" + url = url[:-1] if url[-1] == "/" else url + code = url.split("/")[-1] + final_url = f"{DOMAIN}/{code}" + ref = "https://www.animalwallpapers.online/" + h = {"referer": ref} + + resp = client.get(final_url, headers=h) + soup = BeautifulSoup(resp.content, "html.parser") + inputs = soup.find_all("input") + data = {input.get("name"): input.get("value") for input in inputs} + + h = {"x-requested-with": "XMLHttpRequest"} + time.sleep(8) + r = client.post(f"{DOMAIN}/links/go", data=data, headers=h) + + return r.json()["url"] + except Exception: + return "Something went wrong :(" diff --git a/src/sites/ddl/akmfiles.py b/src/sites/ddl/akmfiles.py new file mode 100644 index 00000000..28e200f0 --- /dev/null +++ b/src/sites/ddl/akmfiles.py @@ -0,0 +1,42 @@ +"""AKMFiles direct link generator module""" + +try: + from cloudscraper import create_scraper + from lxml import etree + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + create_scraper = None + etree = None + +SITE_NAME = "AKMFiles" +URL_PATTERNS = [r"akmfiles\."] + +def process_url(url: str) -> str: + """Generate direct download link for AKMFiles URLs + + Args: + url: AKMFiles URL + + Returns: + Direct download link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, lxml) not available" + + cget = create_scraper().request + + try: + url = cget("GET", url).url + json_data = {"op": "download2", "id": url.split("/")[-1]} + res = cget("POST", url, data=json_data) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + html_tree = etree.HTML(res.content) + direct_link = html_tree.xpath("//a[contains(@class,'btn btn-dow')]/@href") + + if direct_link: + return direct_link[0] + else: + return "ERROR: Direct link not found" diff --git a/src/sites/ddl/anonfiles.py b/src/sites/ddl/anonfiles.py new file mode 100644 index 00000000..d1e75973 --- /dev/null +++ b/src/sites/ddl/anonfiles.py @@ -0,0 +1,41 @@ +""" +Anonfiles-based sites bypasser +""" + +import requests +from bs4 import BeautifulSoup +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "Anonfiles Family" +URL_PATTERNS = [ + r'anonfiles\.com/', r'bayfiles\.com/', r'hotfile\.', r'letsupload\.', r'megaupload\.', + r'filechan\.', r'myfile\.', r'vshare\.', r'rapidshare\.', r'lolabits\.', + r'openload\.', r'share-online\.', r'upvid\.' +] + +def anonfiles_bypass(url): + """ + Generate direct download link for Anonfiles and similar sites + """ + try: + try: + cget = create_scraper().request + content = cget("get", url).content + except: + # Fallback to regular requests + content = requests.get(url).content + + soup = BeautifulSoup(content, "lxml") + download_elem = soup.find(id="download-url") + + if not download_elem: + return "ERROR: File not found or download link unavailable!" + + return download_elem["href"] + + except Exception as e: + return f"Error processing Anonfiles-based site: {str(e)}" + +# Common export function name +process_url = anonfiles_bypass diff --git a/src/sites/ddl/antfiles.py b/src/sites/ddl/antfiles.py new file mode 100644 index 00000000..02a9252d --- /dev/null +++ b/src/sites/ddl/antfiles.py @@ -0,0 +1,37 @@ +""" +Antfiles direct download link generator +""" + +import requests +from bs4 import BeautifulSoup +from urllib.parse import urlparse + +# Site configuration +SITE_NAME = "Antfiles" +URL_PATTERNS = [ + r'antfiles\.com/' +] + +def antfiles_bypass(url): + """ + Generate direct download link for Antfiles + """ + try: + sess = requests.Session() + raw = sess.get(url) + soup = BeautifulSoup(raw.content, "html.parser") + + # Find the main download button + download_link = soup.find(class_="main-btn", href=True) + + if download_link: + parsed_url = urlparse(url) + return f"{parsed_url.scheme}://{parsed_url.netloc}/{download_link['href']}" + else: + return "ERROR: Could not find download link in Antfiles page" + + except Exception as e: + return f"Error processing Antfiles: {str(e)}" + +# Common export function name +process_url = antfiles_bypass diff --git a/src/sites/ddl/dropbox.py b/src/sites/ddl/dropbox.py new file mode 100644 index 00000000..f9d8d39b --- /dev/null +++ b/src/sites/ddl/dropbox.py @@ -0,0 +1,37 @@ +""" +Dropbox direct download link generator +""" + +# Site configuration +SITE_NAME = "Dropbox" +URL_PATTERNS = [ + r'dropbox\.com/', + r'db\.tt/' +] + +def dropbox_bypass(url): + """ + Convert Dropbox share links to direct download links + """ + try: + # Simple URL transformation for Dropbox + direct_url = ( + url.replace("www.", "") + .replace("dropbox.com", "dl.dropboxusercontent.com") + .replace("?dl=0", "") + .replace("?dl=1", "") + ) + + # Ensure it ends with ?dl=1 for direct download + if "?" not in direct_url: + direct_url += "?dl=1" + elif "dl=" not in direct_url: + direct_url += "&dl=1" + + return direct_url + + except Exception as e: + return f"Error processing Dropbox: {str(e)}" + +# Common export function name +process_url = dropbox_bypass diff --git a/src/sites/ddl/fembed.py b/src/sites/ddl/fembed.py new file mode 100644 index 00000000..b16a4af9 --- /dev/null +++ b/src/sites/ddl/fembed.py @@ -0,0 +1,51 @@ +"""Fembed video streaming direct link generator module""" + +from re import search +from requests import session + +SITE_NAME = "Fembed Family" +URL_PATTERNS = [ + r"fembed\.", r"layarkacaxxi\.", r"femax20\.", r"fcdn\.", r"feurl\.", + r"naniplay\.", r"nanime\.", r"mm9842\." +] + +def process_url(link: str) -> str: + """Generate direct download link for Fembed URLs + + Args: + link: Fembed video URL + + Returns: + Direct download link (highest quality) or error message + """ + sess = session() + + try: + url = link.replace("/v/", "/f/") + raw = sess.get(url) + api = search(r"(/api/source/[^\"']+)", raw.text) + + if api is not None: + result = {} + raw = sess.post("https://layarkacaxxi.icu" + api.group(1)).json() + + for d in raw["data"]: + f = d["file"] + head = sess.head(f) + direct = head.headers.get("Location", f) + result[f"{d['label']}/{d['type']}"] = direct + + dl_url = result + + if dl_url: + # Return the last (usually highest quality) link + count = len(dl_url) + lst_link = [dl_url[i] for i in dl_url] + return lst_link[count - 1] + else: + return "ERROR: No download links found" + else: + return "ERROR: API endpoint not found" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/ddl/filepress.py b/src/sites/ddl/filepress.py new file mode 100644 index 00000000..47417d49 --- /dev/null +++ b/src/sites/ddl/filepress.py @@ -0,0 +1,74 @@ +"""Filepress direct link generator module""" + +from urllib.parse import urlparse + +try: + from cloudscraper import create_scraper + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + # Fallback imports to prevent import errors + create_scraper = None + +SITE_NAME = "Filepress" +URL_PATTERNS = [r"filepress\."] + +def process_url(url: str) -> str: + """Generate direct download link for Filepress URLs + + Provides both Google Drive and Telegram download options + + Args: + url: Filepress URL + + Returns: + Direct download links or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper) not available" + + cget = create_scraper().request + + try: + url = cget("GET", url).url + raw = urlparse(url) + + gd_data = { + "id": raw.path.split("/")[-1], + "method": "publicDownlaod", + } + tg_data = { + "id": raw.path.split("/")[-1], + "method": "telegramDownload", + } + + api = f"{raw.scheme}://{raw.hostname}/api/file/downlaod/" + + gd_res = cget( + "POST", + api, + headers={"Referer": f"{raw.scheme}://{raw.hostname}"}, + json=gd_data, + ).json() + tg_res = cget( + "POST", + api, + headers={"Referer": f"{raw.scheme}://{raw.hostname}"}, + json=tg_data, + ).json() + + except Exception as e: + return f"Google Drive: ERROR: {e.__class__.__name__} \nTelegram: ERROR: {e.__class__.__name__}" + + gd_result = ( + f'https://drive.google.com/uc?id={gd_res["data"]}' + if "data" in gd_res + else f'ERROR: {gd_res["statusText"]}' + ) + tg_result = ( + f'https://tghub.xyz/?start={tg_res["data"]}' + if "data" in tg_res + else "No Telegram file available " + ) + + return f"Google Drive: {gd_result} \nTelegram: {tg_result}" diff --git a/src/sites/ddl/gdrive.py b/src/sites/ddl/gdrive.py new file mode 100644 index 00000000..78d791ab --- /dev/null +++ b/src/sites/ddl/gdrive.py @@ -0,0 +1,64 @@ +""" +Google Drive direct download link generator +""" + +import requests +import re + +# Site configuration +SITE_NAME = "Google Drive" +URL_PATTERNS = [ + r'drive\.google\.com/file/d/', + r'drive\.google\.com/open\?id=', + r'docs\.google\.com/.*export' +] + +def generate_gdrive_link(url): + """ + Generate direct download link for Google Drive + """ + try: + # Extract file ID from various Google Drive URL formats + file_id = None + + patterns = [ + r'drive\.google\.com/file/d/([a-zA-Z0-9_-]+)', + r'drive\.google\.com/open\?id=([a-zA-Z0-9_-]+)', + r'id=([a-zA-Z0-9_-]+)' + ] + + for pattern in patterns: + match = re.search(pattern, url) + if match: + file_id = match.group(1) + break + + if not file_id: + return f"Could not extract Google Drive file ID from URL: {url}" + + # Generate direct download URL + direct_url = f"https://drive.google.com/uc?export=download&id={file_id}" + + # For large files, Google Drive requires confirmation + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' + } + + response = requests.get(direct_url, headers=headers, timeout=10) + + # Check if it's a large file that needs confirmation + if 'download_warning' in response.text: + # Extract the confirmation token + confirm_match = re.search(r'confirm=([^&]+)', response.text) + if confirm_match: + confirm_token = confirm_match.group(1) + confirmed_url = f"https://drive.google.com/uc?export=download&confirm={confirm_token}&id={file_id}" + return confirmed_url + + return direct_url + + except Exception as e: + return f"Error generating Google Drive link: {str(e)}" + +# Common export function name +process_url = generate_gdrive_link diff --git a/src/sites/ddl/github.py b/src/sites/ddl/github.py new file mode 100644 index 00000000..885ecbed --- /dev/null +++ b/src/sites/ddl/github.py @@ -0,0 +1,45 @@ +""" +GitHub releases direct download link generator +""" + +import re +import requests +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "GitHub" +URL_PATTERNS = [ + r'github\.com/.*?/releases/' +] + +def github_bypass(url): + """ + Generate direct download link for GitHub releases + """ + try: + # Validate it's a GitHub releases URL + try: + re.findall(r"\bhttps?://.*github\.com.*releases\S+", url)[0] + except IndexError: + return "No GitHub Releases links found in URL" + + try: + cget = create_scraper().request + download = cget("get", url, stream=True, allow_redirects=False) + except: + # Fallback to regular requests + download = requests.get(url, stream=True, allow_redirects=False) + + # GitHub releases redirect to direct download links + if "location" in download.headers: + return download.headers["location"] + elif "Location" in download.headers: + return download.headers["Location"] + else: + return "ERROR: Can't extract the direct download link from GitHub" + + except Exception as e: + return f"Error processing GitHub: {str(e)}" + +# Common export function name +process_url = github_bypass diff --git a/src/sites/ddl/gofile.py b/src/sites/ddl/gofile.py new file mode 100644 index 00000000..cf3ed2d3 --- /dev/null +++ b/src/sites/ddl/gofile.py @@ -0,0 +1,56 @@ +""" +Gofile direct download link generator +""" + +import hashlib +import requests + +# Site configuration +SITE_NAME = "Gofile" +URL_PATTERNS = [ + r'gofile\.io/d/', + r'gofile\.io/c/', + r'gofile\.io/' +] + +def gofile_bypass(url, password=""): + """ + Generate direct download link for Gofile using official API + """ + try: + api_uri = "https://api.gofile.io" + client = requests.Session() + + # Create account + res = client.get(api_uri + "/createAccount").json() + + if "data" not in res or "token" not in res["data"]: + return "Error: Could not create Gofile account" + + data = { + "contentId": url.split("/")[-1], + "token": res["data"]["token"], + "websiteToken": "12345", + "cache": "true", + "password": hashlib.sha256(password.encode("utf-8")).hexdigest(), + } + + res = client.get(api_uri + "/getContent", params=data).json() + + if "data" not in res or "contents" not in res["data"]: + return "Error: Could not get Gofile content" + + content = [] + for item in res["data"]["contents"].values(): + content.append(item) + + if not content: + return "Error: No files found in Gofile link" + + return content[0]["link"] + + except Exception as e: + return f"Error processing Gofile: {str(e)}" + +# Common export function name +process_url = gofile_bypass \ No newline at end of file diff --git a/src/sites/ddl/hxfile.py b/src/sites/ddl/hxfile.py new file mode 100644 index 00000000..2e866108 --- /dev/null +++ b/src/sites/ddl/hxfile.py @@ -0,0 +1,60 @@ +"""HXFile direct link generator module""" + +from urllib.parse import urlparse +from requests import session + +try: + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + BeautifulSoup = None + +SITE_NAME = "HXFile" +URL_PATTERNS = [r"hxfile\."] + +def process_url(url: str) -> str: + """Generate direct download link for HXFile URLs + + Args: + url: HXFile URL + + Returns: + Direct download link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (beautifulsoup4) not available" + + sess = session() + + try: + headers = { + "content-type": "application/x-www-form-urlencoded", + "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Safari/537.36", + } + + # Extract file ID from URL path + file_id = urlparse(url).path.strip("/") + + data = { + "op": "download2", + "id": file_id, + "rand": "", + "referer": "", + "method_free": "", + "method_premium": "", + } + + response = sess.post(url, headers=headers, data=data) + soup = BeautifulSoup(response.text, "html.parser") + + # Try to find download button + if btn := soup.find(class_="btn btn-dow"): + return btn["href"] + if unique := soup.find(id="uniqueExpirylink"): + return unique["href"] + + return "ERROR: Download link not found" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/ddl/krakenfiles.py b/src/sites/ddl/krakenfiles.py new file mode 100644 index 00000000..00afdfaa --- /dev/null +++ b/src/sites/ddl/krakenfiles.py @@ -0,0 +1,56 @@ +""" +Krakenfiles direct download link generator +""" + +import requests +from lxml import etree + +# Site configuration +SITE_NAME = "Krakenfiles" +URL_PATTERNS = [ + r'krakenfiles\.com/' +] + +def krakenfiles_bypass(url): + """ + Generate direct download link for Krakenfiles + """ + try: + sess = requests.session() + + try: + res = sess.get(url) + html = etree.HTML(res.text) + + # Find the form action URL + post_url_list = html.xpath('//form[@id="dl-form"]/@action') + if post_url_list: + post_url = f"https:{post_url_list[0]}" + else: + sess.close() + return "ERROR: Unable to find post link on Krakenfiles." + + # Find the token + token_list = html.xpath('//input[@id="dl-token"]/@value') + if token_list: + data = {"token": token_list[0]} + else: + sess.close() + return "ERROR: Unable to find token for Krakenfiles." + + except Exception as e: + sess.close() + return f"ERROR: {e.__class__.__name__} while parsing Krakenfiles page" + + try: + dl_response = sess.post(post_url, data=data).json() + return dl_response["url"] + except Exception as e: + sess.close() + return f"ERROR: {e.__class__.__name__} while getting Krakenfiles download link" + + except Exception as e: + return f"Error processing Krakenfiles: {str(e)}" + +# Common export function name +process_url = krakenfiles_bypass diff --git a/src/sites/ddl/letsupload.py b/src/sites/ddl/letsupload.py new file mode 100644 index 00000000..776805d9 --- /dev/null +++ b/src/sites/ddl/letsupload.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Letsupload DDL bypasser +Extracts direct download links from letsupload.io + +Site: letsupload.io +Method: POST request to get direct link from response text +""" + +import re +try: + from cloudscraper import create_scraper + SCRAPER_AVAILABLE = True +except ImportError: + SCRAPER_AVAILABLE = False + +# Site configuration +SITE_NAME = "letsupload" +URL_PATTERNS = [ + r'letsupload\.io' +] + +def process_url(url: str) -> str: + """ + Extract direct download link from letsupload.io + + Args: + url: letsupload.io URL + + Returns: + Direct download link or error message + """ + if not SCRAPER_AVAILABLE: + return "ERROR: cloudscraper module not available" + + cget = create_scraper().request + try: + res = cget("POST", url) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + direct_link = re.findall(r"(https?://letsupload\.io\/.+?)\'", res.text) + if direct_link: + return direct_link[0] + else: + return "ERROR: Direct Link not found" diff --git a/src/sites/ddl/linkbox.py b/src/sites/ddl/linkbox.py new file mode 100644 index 00000000..6b71bc62 --- /dev/null +++ b/src/sites/ddl/linkbox.py @@ -0,0 +1,57 @@ +"""Linkbox direct link generator module""" + +from urllib.parse import quote + +try: + from cloudscraper import create_scraper + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + create_scraper = None + +SITE_NAME = "Linkbox" +URL_PATTERNS = [r"linkbox\."] + +def process_url(url: str) -> str: + """Generate direct download link for Linkbox URLs + + Args: + url: Linkbox URL + + Returns: + Direct download link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper) not available" + + cget = create_scraper().request + + try: + url = cget("GET", url).url + res = cget( + "GET", f'https://www.linkbox.to/api/file/detail?itemId={url.split("/")[-1]}' + ).json() + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + if "data" not in res: + return "ERROR: Data not found!!" + + data = res["data"] + if not data: + return "ERROR: Data is None!!" + + if "itemInfo" not in data: + return "ERROR: itemInfo not found!!" + + itemInfo = data["itemInfo"] + if "url" not in itemInfo: + return "ERROR: url not found in itemInfo!!" + + if "name" not in itemInfo: + return "ERROR: Name not found in itemInfo!!" + + name = quote(itemInfo["name"]) + raw = itemInfo["url"].split("/", 3)[-1] + + return f"https://wdl.nuplink.net/{raw}&filename={name}" diff --git a/src/sites/ddl/mdisk.py b/src/sites/ddl/mdisk.py new file mode 100644 index 00000000..4daf7983 --- /dev/null +++ b/src/sites/ddl/mdisk.py @@ -0,0 +1,44 @@ +""" +Mdisk direct download link generator +""" + +import requests + +# Site configuration +SITE_NAME = "Mdisk" +URL_PATTERNS = [ + r'mdisk\.me/' +] + +def mdisk_bypass(url): + """ + Generate direct download link for Mdisk + """ + try: + header = { + "Accept": "*/*", + "Accept-Language": "en-US,en;q=0.5", + "Accept-Encoding": "gzip, deflate, br", + "Referer": "https://mdisk.me/", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36", + } + + # Extract file ID from URL + file_id = url.split("/")[-1] + API_URL = f"https://diskuploader.entertainvideo.com/v1/file/cdnurl?param={file_id}" + + response = requests.get(url=API_URL, headers=header) + response.raise_for_status() + + json_data = response.json() + + if "source" in json_data: + return json_data["source"] + else: + return "ERROR: Could not find source URL in Mdisk response" + + except Exception as e: + return f"Error processing Mdisk: {str(e)}" + +# Common export function name +process_url = mdisk_bypass diff --git a/src/sites/ddl/mediafire.py b/src/sites/ddl/mediafire.py new file mode 100644 index 00000000..50cb9384 --- /dev/null +++ b/src/sites/ddl/mediafire.py @@ -0,0 +1,57 @@ +""" +MediaFire direct download link generator +""" + +import requests +import re +try: + from bs4 import BeautifulSoup +except ImportError: + print("Warning: BeautifulSoup not available for MediaFire module") + BeautifulSoup = None + +# Site configuration +SITE_NAME = "MediaFire" +URL_PATTERNS = [ + r'mediafire\.com/file/', + r'mediafire\.com/\?', + r'mediafire\.com/download/' +] + +def generate_mediafire_link(url): + """ + Generate direct download link for MediaFire + """ + try: + if BeautifulSoup is None: + return f"BeautifulSoup required for MediaFire: {url}" + + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' + } + + response = requests.get(url, headers=headers, timeout=15) + response.raise_for_status() + + soup = BeautifulSoup(response.content, 'html.parser') + + # Try to find the download button/link + download_button = soup.find('a', {'aria-label': 'Download file'}) + if download_button and download_button.get('href'): + return download_button['href'] + + # Fallback: look for direct download link in scripts + scripts = soup.find_all('script') + for script in scripts: + if script.string and 'downloadUrl' in script.string: + match = re.search(r'"downloadUrl":"([^"]+)"', script.string) + if match: + return match.group(1).replace('\\', '') + + return f"Could not extract direct link from MediaFire: {url}" + + except Exception as e: + return f"Error generating MediaFire link: {str(e)}" + +# Common export function name +process_url = generate_mediafire_link diff --git a/src/sites/ddl/onedrive.py b/src/sites/ddl/onedrive.py new file mode 100644 index 00000000..09722d84 --- /dev/null +++ b/src/sites/ddl/onedrive.py @@ -0,0 +1,47 @@ +"""OneDrive direct link generator module""" + +from urllib.parse import urlparse +from base64 import standard_b64encode + +try: + from cloudscraper import create_scraper + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + create_scraper = None + +SITE_NAME = "OneDrive" +URL_PATTERNS = [r"1drv\.ms", r"onedrive\.live\.com"] + +def process_url(link: str) -> str: + """Generate direct download link for OneDrive URLs + + Based on https://github.com/UsergeTeam/Userge + + Args: + link: OneDrive share URL + + Returns: + Direct download link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper) not available" + + link_without_query = urlparse(link)._replace(query=None).geturl() + direct_link_encoded = str( + standard_b64encode(bytes(link_without_query, "utf-8")), "utf-8" + ) + direct_link1 = ( + f"https://api.onedrive.com/v1.0/shares/u!{direct_link_encoded}/root/content" + ) + cget = create_scraper().request + + try: + resp = cget("head", direct_link1) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + if resp.status_code != 302: + return "ERROR: Unauthorized link, the link may be private" + + return resp.next.url diff --git a/src/sites/ddl/onefichier.py b/src/sites/ddl/onefichier.py new file mode 100644 index 00000000..46c19415 --- /dev/null +++ b/src/sites/ddl/onefichier.py @@ -0,0 +1,107 @@ +"""1Fichier direct link generator module""" + +from re import match + +try: + from cloudscraper import create_scraper + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + # Fallback imports to prevent import errors + create_scraper = None + BeautifulSoup = None + +SITE_NAME = "1Fichier" +URL_PATTERNS = [r"1fichier\.com"] + +def process_url(link: str) -> str: + """Generate direct download link for 1Fichier URLs + + Based on https://github.com/Maujar + Supports password-protected links with :: separator + + Args: + link: 1Fichier URL (optionally with password: url::password) + + Returns: + Direct download link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, beautifulsoup4) not available" + + regex = r"^([http:\/\/|https:\/\/]+)?.*1fichier\.com\/\?.+" + gan = match(regex, link) + if not gan: + return "ERROR: The link you entered is wrong!" + + # Parse password from link if present + if "::" in link: + pswd = link.split("::")[-1] + url = link.split("::")[-2] + else: + pswd = None + url = link + + cget = create_scraper().request + + try: + if pswd is None: + req = cget("post", url) + else: + pw = {"pass": pswd} + req = cget("post", url, data=pw) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + if req.status_code == 404: + return "ERROR: File not found/The link you entered is wrong!" + + soup = BeautifulSoup(req.content, "lxml") + + # Check for direct download button + if soup.find("a", {"class": "ok btn-general btn-orange"}): + dl_url = soup.find("a", {"class": "ok btn-general btn-orange"})["href"] + if dl_url: + return dl_url + return "ERROR: Unable to generate Direct Link 1fichier!" + + # Handle warnings and errors + warnings = soup.find_all("div", {"class": "ct_warn"}) + + if len(warnings) == 3: + str_2 = warnings[-1] + warning_text = str(str_2).lower() + + if "you must wait" in warning_text: + numbers = [int(word) for word in str(str_2).split() if word.isdigit()] + if numbers: + return f"ERROR: 1fichier is on a limit. Please wait {numbers[0]} minute." + else: + return "ERROR: 1fichier is on a limit. Please wait a few minutes/hour." + elif "protect access" in warning_text: + return ("ERROR: This link requires a password!\n\n" + "This link requires a password!\n" + "- Insert sign :: after the link and write the password after the sign.\n\n" + "Example: https://1fichier.com/?smmtd8twfpm66awbqz04::love you\n\n" + "* No spaces between the signs ::\n" + "* For the password, you can use a space!") + else: + return "ERROR: Failed to generate Direct Link from 1fichier!" + + elif len(warnings) == 4: + str_1 = warnings[-2] + str_3 = warnings[-1] + + if "you must wait" in str(str_1).lower(): + numbers = [int(word) for word in str(str_1).split() if word.isdigit()] + if numbers: + return f"ERROR: 1fichier is on a limit. Please wait {numbers[0]} minute." + else: + return "ERROR: 1fichier is on a limit. Please wait a few minutes/hour." + elif "bad password" in str(str_3).lower(): + return "ERROR: The password you entered is wrong!" + else: + return "ERROR: Error trying to generate Direct Link from 1fichier!" + else: + return "ERROR: Error trying to generate Direct Link from 1fichier!" diff --git a/src/sites/ddl/osdn.py b/src/sites/ddl/osdn.py new file mode 100644 index 00000000..8135bba1 --- /dev/null +++ b/src/sites/ddl/osdn.py @@ -0,0 +1,63 @@ +""" +OSDN direct download link generator +""" + +import re +from urllib.parse import unquote +import requests +from bs4 import BeautifulSoup +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "OSDN" +URL_PATTERNS = [ + r'osdn\.net/' +] + +def osdn_bypass(url): + """ + Generate direct download link for OSDN + """ + try: + osdn_link = "https://osdn.net" + + # Extract OSDN link if provided in a mixed URL + try: + link = re.findall(r"\bhttps?://.*osdn\.net\S+", url)[0] + except IndexError: + link = url # Use original URL if it's already an OSDN link + + try: + cget = create_scraper().request + response = cget("get", link, allow_redirects=True) + page = BeautifulSoup(response.content, "lxml") + except: + # Fallback to regular requests + response = requests.get(link, allow_redirects=True) + page = BeautifulSoup(response.content, "lxml") + + info = page.find("a", {"class": "mirror_link"}) + if not info: + return "ERROR: Could not find mirror link in OSDN page" + + link = unquote(osdn_link + info["href"]) + + mirrors_form = page.find("form", {"id": "mirror-select-form"}) + if not mirrors_form: + return link # Return direct link if no mirrors found + + mirrors = mirrors_form.findAll("tr") + if len(mirrors) > 1: + # Use first available mirror + mirror_input = mirrors[1].find("input") + if mirror_input: + mirror = mirror_input["value"] + link = re.sub(r"m=(.*)&f", f"m={mirror}&f", link) + + return link + + except Exception as e: + return f"Error processing OSDN: {str(e)}" + +# Common export function name +process_url = osdn_bypass diff --git a/src/sites/ddl/pixeldrain.py b/src/sites/ddl/pixeldrain.py new file mode 100644 index 00000000..18fe4272 --- /dev/null +++ b/src/sites/ddl/pixeldrain.py @@ -0,0 +1,52 @@ +""" +Pixeldrain direct download link generator +""" + +import requests +import re +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "Pixeldrain" +URL_PATTERNS = [ + r'pixeldrain\.com/u/', + r'pixeldrain\.com/api/', + r'pixeldrain\.com/l/' +] + +def pixeldrain_bypass(url): + """ + Generate direct download link for Pixeldrain files + """ + try: + url = url.strip("/ ") + file_id = url.split("/")[-1] + + # Check if it's a list or single file + if url.split("/")[-2] == "l": + info_link = f"https://pixeldrain.com/api/list/{file_id}" + dl_link = f"https://pixeldrain.com/api/list/{file_id}/zip?download" + else: + info_link = f"https://pixeldrain.com/api/file/{file_id}/info" + dl_link = f"https://pixeldrain.com/api/file/{file_id}?download" + + try: + cget = create_scraper().request + resp = cget("get", info_link).json() + except Exception as e: + # Fallback to regular requests if cfscraper not available + try: + resp = requests.get(info_link).json() + except: + return f"ERROR: Could not access Pixeldrain API - {e.__class__.__name__}" + + if resp.get("success", True): # Some responses don't have success field + return dl_link + else: + return f"ERROR: Can't download due to {resp.get('message', 'unknown error')}" + + except Exception as e: + return f"Error processing Pixeldrain: {str(e)}" + +# Common export function name +process_url = pixeldrain_bypass diff --git a/src/sites/ddl/racaty.py b/src/sites/ddl/racaty.py new file mode 100644 index 00000000..0e511f72 --- /dev/null +++ b/src/sites/ddl/racaty.py @@ -0,0 +1,45 @@ +"""Racaty direct link generator module""" + +try: + from cloudscraper import create_scraper + from lxml import etree + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + # Fallback imports to prevent import errors + create_scraper = None + etree = None + +SITE_NAME = "Racaty" +URL_PATTERNS = [r"racaty\."] + +def process_url(url: str) -> str: + """Generate direct download link for Racaty URLs + + By https://github.com/junedkh + + Args: + url: Racaty URL + + Returns: + Direct download link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper, lxml) not available" + + cget = create_scraper().request + + try: + url = cget("GET", url).url + json_data = {"op": "download2", "id": url.split("/")[-1]} + res = cget("POST", url, data=json_data) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + html_tree = etree.HTML(res.text) + direct_link = html_tree.xpath("//a[contains(@id,'uniqueExpirylink')]/@href") + + if direct_link: + return direct_link[0] + else: + return "ERROR: Direct link not found" diff --git a/src/sites/ddl/sbembed.py b/src/sites/ddl/sbembed.py new file mode 100644 index 00000000..c19502d0 --- /dev/null +++ b/src/sites/ddl/sbembed.py @@ -0,0 +1,61 @@ +"""SBEmbed video streaming direct link generator module""" + +from re import compile, findall +from requests import session + +try: + from bs4 import BeautifulSoup + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + BeautifulSoup = None + +SITE_NAME = "SBEmbed Family" +URL_PATTERNS = [r"sbembed\.", r"tubesb\.", r"watchsb\.", r"streamsb\.", r"sbplay\."] + +def process_url(link: str) -> str: + """Generate direct download link for SBEmbed URLs + + Args: + link: SBEmbed video URL + + Returns: + Direct download link (highest quality) or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (beautifulsoup4) not available" + + sess = session() + + try: + raw = sess.get(link) + soup = BeautifulSoup(raw.text, "html.parser") + + result = {} + for a in soup.findAll("a", onclick=compile(r"^download_video[^>]+")): + data = dict( + zip( + ["id", "mode", "hash"], + findall(r"[\"']([^\"']+)[\"']", a["onclick"]), + ) + ) + data["op"] = "download_orig" + + raw = sess.get("https://sbembed.com/dl", params=data) + soup = BeautifulSoup(raw.text, "html.parser") + + if direct := soup.find("a", text=compile("(?i)^direct")): + result[a.text] = direct["href"] + + dl_url = result + + if dl_url: + # Return the last (usually highest quality) link + count = len(dl_url) + lst_link = [dl_url[i] for i in dl_url] + return lst_link[count - 1] + else: + return "ERROR: No download links found" + + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/ddl/shrdsk.py b/src/sites/ddl/shrdsk.py new file mode 100644 index 00000000..048593b7 --- /dev/null +++ b/src/sites/ddl/shrdsk.py @@ -0,0 +1,43 @@ +"""Shrdsk direct link generator module""" + +try: + from cloudscraper import create_scraper + DEPENDENCIES_AVAILABLE = True +except ImportError: + DEPENDENCIES_AVAILABLE = False + create_scraper = None + +SITE_NAME = "Shrdsk" +URL_PATTERNS = [r"shrdsk\."] + +def process_url(url: str) -> str: + """Generate direct download link for Shrdsk URLs + + Args: + url: Shrdsk URL + + Returns: + Direct download link or error message + """ + if not DEPENDENCIES_AVAILABLE: + return "ERROR: Required dependencies (cloudscraper) not available" + + cget = create_scraper().request + + try: + url = cget("GET", url).url + res = cget( + "GET", + f'https://us-central1-affiliate2apk.cloudfunctions.net/get_data?shortid={url.split("/")[-1]}', + ) + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + if res.status_code != 200: + return f"ERROR: Status Code {res.status_code}" + + res = res.json() + if "type" in res and res["type"].lower() == "upload" and "video_url" in res: + return res["video_url"] + + return "ERROR: cannot find direct link" diff --git a/src/sites/ddl/solidfiles.py b/src/sites/ddl/solidfiles.py new file mode 100644 index 00000000..518d852a --- /dev/null +++ b/src/sites/ddl/solidfiles.py @@ -0,0 +1,52 @@ +""" +Solidfiles direct download link generator +""" + +import re +from json import loads +import requests +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "Solidfiles" +URL_PATTERNS = [ + r'solidfiles\.com/' +] + +def solidfiles_bypass(url): + """ + Generate direct download link for Solidfiles + Based on https://github.com/Xonshiz/SolidFiles-Downloader + By https://github.com/Jusidama18 + """ + try: + try: + cget = create_scraper().request + except: + # Fallback to regular requests + cget = requests.get + + headers = { + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36" + } + + pageSource = cget(url, headers=headers).text + + # Extract viewerOptions from JavaScript + match = re.search(r"viewerOptions\'\,\ (.*?)\)\;", pageSource) + if not match: + return f"ERROR: Could not find viewerOptions in Solidfiles page" + + mainOptions = match.group(1) + options_data = loads(mainOptions) + + if "downloadUrl" not in options_data: + return f"ERROR: No download URL found in Solidfiles data" + + return options_data["downloadUrl"] + + except Exception as e: + return f"Error processing Solidfiles: {str(e)}" + +# Common export function name +process_url = solidfiles_bypass diff --git a/src/sites/ddl/streamtape.py b/src/sites/ddl/streamtape.py new file mode 100644 index 00000000..e1fb1c47 --- /dev/null +++ b/src/sites/ddl/streamtape.py @@ -0,0 +1,35 @@ +""" +Streamtape direct download link generator +""" + +import re +import requests + +# Site configuration +SITE_NAME = "Streamtape" +URL_PATTERNS = [ + r'streamtape\.com/', + r'streamtape\.co/' +] + +def streamtape_bypass(url): + """ + Generate direct download link for Streamtape + """ + try: + response = requests.get(url) + + # Find video link from page + videolink = re.findall(r"document.*((?=id\=)[^\"']+)", response.text) + + if videolink: + nexturl = "https://streamtape.com/get_video?" + videolink[-1] + return nexturl + else: + return "ERROR: Could not find video link in Streamtape page" + + except Exception as e: + return f"Error processing Streamtape: {str(e)}" + +# Common export function name +process_url = streamtape_bypass diff --git a/src/sites/ddl/terabox.py b/src/sites/ddl/terabox.py new file mode 100644 index 00000000..d6a29407 --- /dev/null +++ b/src/sites/ddl/terabox.py @@ -0,0 +1,73 @@ +""" +Terabox direct download link generator +""" + +import requests +from bs4 import BeautifulSoup + +# Site configuration +SITE_NAME = "Terabox Family" +URL_PATTERNS = [ + r'terabox\.com/', r'www\.terabox\.com/', r'teraboxapp\.com/', + r'4funbox\.com/', r'mirrobox\.com/', r'nephobox\.com/', r'momerybox\.com/' +] + +def terabox_bypass(url): + """ + Generate direct download link for Terabox files + """ + try: + sess = requests.session() + + # Get initial page + res = sess.get(url) + url = res.url + + key = url.split("?surl=")[-1] + url = f"http://www.terabox.com/wap/share/filelist?surl={key}" + + # Note: This would need TERA_COOKIE for full functionality + # For now, attempt without cookie + try: + res = sess.get(url) + except Exception as e: + return f"Error accessing Terabox: {str(e)}" + + key = res.url.split("?surl=")[-1] + soup = BeautifulSoup(res.content, "lxml") + jsToken = None + + # Extract JS token + for fs in soup.find_all("script"): + fstring = fs.string + if fstring and fstring.startswith("try {eval(decodeURIComponent"): + jsToken = fstring.split("%22")[1] + break + + if not jsToken: + return "Error: Could not find Terabox authentication token" + + # Get file list + list_url = f"https://www.terabox.com/share/list?app_id=250528&jsToken={jsToken}&shorturl={key}&root=1" + res = sess.get(list_url) + result = res.json() + + if result["errno"] != 0: + return f"ERROR: '{result['errmsg']}' Check Terabox access" + + result = result["list"] + if len(result) > 1: + return "ERROR: Can't download multiple files from Terabox" + + result = result[0] + + if result["isdir"] != "0": + return "ERROR: Can't download folder from Terabox" + + return result.get("dlink", "Error: No download link found") + + except Exception as e: + return f"Error processing Terabox: {str(e)}" + +# Common export function name +process_url = terabox_bypass diff --git a/src/sites/ddl/uploadee.py b/src/sites/ddl/uploadee.py new file mode 100644 index 00000000..aa88a244 --- /dev/null +++ b/src/sites/ddl/uploadee.py @@ -0,0 +1,41 @@ +""" +Upload.ee direct download link generator +""" + +import requests +from bs4 import BeautifulSoup +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "Upload.ee" +URL_PATTERNS = [ + r'upload\.ee/', + r'uploadee\.com/' +] + +def uploadee_bypass(url): + """ + Generate direct download link for Upload.ee + By https://github.com/iron-heart-x + """ + try: + try: + cget = create_scraper().request + content = cget("get", url).content + except: + # Fallback to regular requests + content = requests.get(url).content + + soup = BeautifulSoup(content, "lxml") + download_link = soup.find("a", attrs={"id": "d_l"}) + + if not download_link: + return f"ERROR: Could not find download link in Upload.ee page" + + return download_link["href"] + + except Exception as e: + return f"Error processing Upload.ee: {str(e)}" + +# Common export function name +process_url = uploadee_bypass diff --git a/src/sites/ddl/uptobox.py b/src/sites/ddl/uptobox.py new file mode 100644 index 00000000..c07d6ded --- /dev/null +++ b/src/sites/ddl/uptobox.py @@ -0,0 +1,68 @@ +""" +Uptobox direct download link generator +""" + +import re +from time import sleep +import requests +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "Uptobox" +URL_PATTERNS = [ + r'uptobox\.com/' +] + +def uptobox_bypass(url): + """ + Generate direct download link for Uptobox + Based on https://github.com/jovanzers/WinTenCermin and https://github.com/sinoobie/noobie-mirror + """ + try: + # Validate Uptobox URL + try: + link = re.findall(r"\bhttps?://.*uptobox\.com\S+", url)[0] + except IndexError: + return "No Uptobox links found in URL" + + # Check if already a direct link + dl_link = re.findall(r"\bhttps?://.*\.uptobox\.com/dl\S+", url) + if dl_link: + return dl_link[0] + + try: + cget = create_scraper().request + except: + # Fallback to regular requests + cget = requests.get + + try: + file_id = re.findall(r"\bhttps?://.*uptobox\.com/(\w+)", url)[0] + # Using API without token (limited functionality) + file_link = f"https://uptobox.com/api/link?file_code={file_id}" + res = cget(file_link).json() + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + + if res["statusCode"] == 0: + return res["data"]["dlLink"] + elif res["statusCode"] == 16: + # Wait required + sleep(1) + waiting_token = res["data"]["waitingToken"] + sleep(res["data"]["waiting"]) + try: + res = cget(f"{file_link}&waitingToken={waiting_token}").json() + return res["data"]["dlLink"] + except Exception as e: + return f"ERROR: {e.__class__.__name__}" + elif res["statusCode"] == 39: + return f"ERROR: Uptobox is being limited, please wait" + else: + return f"ERROR: {res.get('message', 'Unknown Uptobox API error')}" + + except Exception as e: + return f"Error processing Uptobox: {str(e)}" + +# Common export function name +process_url = uptobox_bypass diff --git a/src/sites/ddl/wetransfer.py b/src/sites/ddl/wetransfer.py new file mode 100644 index 00000000..6fe09c45 --- /dev/null +++ b/src/sites/ddl/wetransfer.py @@ -0,0 +1,63 @@ +""" +WeTransfer direct download link generator +""" + +import requests +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "WeTransfer" +URL_PATTERNS = [ + r'wetransfer\.com/', + r'we\.tl/' +] + +def wetransfer_bypass(url): + """ + Generate direct download link for WeTransfer + """ + try: + try: + cget = create_scraper().request + except: + # Fallback to regular requests + def cget(method, url, **kwargs): + return requests.request(method, url, **kwargs) + + # Get the actual transfer URL + try: + response = cget("GET", url) + url = response.url + except: + pass # Use original URL if redirect fails + + # Extract transfer ID and security hash + url_parts = url.split("/") + if len(url_parts) < 2: + return "ERROR: Invalid WeTransfer URL format" + + transfer_id = url_parts[-2] + security_hash = url_parts[-1] + + json_data = { + "security_hash": security_hash, + "intent": "entire_transfer" + } + + api_url = f'https://wetransfer.com/api/v4/transfers/{transfer_id}/download' + res = cget("POST", api_url, json=json_data).json() + + if "direct_link" in res: + return res["direct_link"] + elif "message" in res: + return f"ERROR: {res['message']}" + elif "error" in res: + return f"ERROR: {res['error']}" + else: + return "ERROR: Cannot find direct link for WeTransfer" + + except Exception as e: + return f"Error processing WeTransfer: {str(e)}" + +# Common export function name +process_url = wetransfer_bypass diff --git a/src/sites/ddl/yandex.py b/src/sites/ddl/yandex.py new file mode 100644 index 00000000..14f1cc0f --- /dev/null +++ b/src/sites/ddl/yandex.py @@ -0,0 +1,46 @@ +""" +Yandex.Disk direct download link generator +""" + +import re +import requests +from cfscrape import create_scraper + +# Site configuration +SITE_NAME = "Yandex.Disk" +URL_PATTERNS = [ + r'yadi\.sk/', + r'disk\.yandex\.com/' +] + +def yandex_disk_bypass(url): + """ + Generate direct download link for Yandex.Disk + Based on https://github.com/wldhx/yadisk-direct + """ + try: + # Extract Yandex.Disk link + try: + link = re.findall(r"\b(https?://(yadi\.sk|disk\.yandex\.com)\S+)", url)[0][0] + except IndexError: + return "No Yandex.Disk links found in URL" + + api = "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key={}" + + try: + cget = create_scraper().request + response = cget("get", api.format(link)).json() + except: + # Fallback to regular requests + response = requests.get(api.format(link)).json() + + if "href" in response: + return response["href"] + else: + return "ERROR: File not found/Download limit reached" + + except Exception as e: + return f"Error processing Yandex.Disk: {str(e)}" + +# Common export function name +process_url = yandex_disk_bypass diff --git a/src/sites/ddl/zippyshare.py b/src/sites/ddl/zippyshare.py new file mode 100644 index 00000000..e9a85305 --- /dev/null +++ b/src/sites/ddl/zippyshare.py @@ -0,0 +1,54 @@ +""" +Zippyshare direct download link generator +""" + +import requests +import re +from lxml import etree + +# Site configuration +SITE_NAME = "Zippyshare" +URL_PATTERNS = [ + r'zippyshare\.com/v/', + r'www\d+\.zippyshare\.com/v/' +] + +def zippyshare_bypass(url): + """ + Generate direct download link for Zippyshare + """ + try: + # Use regular requests since cfscraper might not be available + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' + } + resp = requests.get(url, headers=headers) + + if not resp.ok: + return f"Zippyshare file not accessible: {url}" + + if re.findall(r">File does not exist on this server<", resp.text): + return f"Zippyshare file does not exist: {url}" + + # Look for the download button JavaScript + script_match = re.search(r'document\.getElementById\(\'dlbutton\'\)\.href\s*=\s*"([^"]+)"\s*\+\s*\(([^)]+)\)', resp.text) + if script_match: + try: + base_url = script_match.group(1) + math_expr = script_match.group(2) + + # Safely evaluate simple math expressions + if re.match(r'^[\d\s\+\-\*\/\(\)%]+$', math_expr): + result = eval(math_expr) + download_url = base_url + str(result) + return download_url + except: + pass + + return f"Could not extract Zippyshare download link: {url}" + + except Exception as e: + return f"Error processing Zippyshare: {str(e)}" + +# Common export function name +process_url = zippyshare_bypass diff --git a/src/sites/freewall/adobestock.py b/src/sites/freewall/adobestock.py new file mode 100644 index 00000000..655512ae --- /dev/null +++ b/src/sites/freewall/adobestock.py @@ -0,0 +1,21 @@ +"""Adobe Stock image downloader module""" + +from core.utils import downloaderla, decrypt + +SITE_NAME = "Adobe Stock" +URL_PATTERNS = [r"stock\.adobe\.com"] + +def process_url(url: str) -> str: + """Download watermark-free images from Adobe Stock + + Args: + url: Adobe Stock image URL + + Returns: + Direct download link or error message + """ + try: + res = downloaderla(url, "https://new.downloader.la/adobe.php") + return decrypt(res, "#") + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/freewall/alamy.py b/src/sites/freewall/alamy.py new file mode 100644 index 00000000..5ac8e62a --- /dev/null +++ b/src/sites/freewall/alamy.py @@ -0,0 +1,51 @@ +""" +Alamy stock photo bypasser +""" + +import requests +import base64 + +# Site configuration +SITE_NAME = "Alamy" +URL_PATTERNS = [ + r'alamy\.com/' +] + +def decrypt(res, key): + """ + Decrypt response from downloader service + """ + if res.get("success"): + return base64.b64decode(res["result"].split(key)[-1]).decode("utf-8") + return None + +def downloaderla(url, site): + """ + Use downloader.la service + """ + try: + params = { + "url": url, + } + return requests.get(site, params=params).json() + except: + return {"success": False} + +def alamy_bypass(url): + """ + Bypass Alamy watermarks + """ + try: + res = downloaderla(url, "https://new.downloader.la/alamy.php") + result = decrypt(res, "#") + + if result: + return result + else: + return "Error: Could not bypass Alamy watermark" + + except Exception as e: + return f"Error bypassing Alamy: {str(e)}" + +# Common export function name +process_url = alamy_bypass diff --git a/src/sites/freewall/getty.py b/src/sites/freewall/getty.py new file mode 100644 index 00000000..d4b2c5b8 --- /dev/null +++ b/src/sites/freewall/getty.py @@ -0,0 +1,52 @@ +""" +Getty Images bypasser +""" + +import requests +import base64 + +# Site configuration +SITE_NAME = "Getty Images" +URL_PATTERNS = [ + r'gettyimages\.', + r'istockphoto\.com/' +] + +def decrypt(res, key): + """ + Decrypt response from downloader service + """ + if res.get("success"): + return base64.b64decode(res["result"].split(key)[-1]).decode("utf-8") + return None + +def downloaderla(url, site): + """ + Use downloader service + """ + try: + params = { + "url": url, + } + return requests.get(site, params=params).json() + except: + return {"success": False} + +def getty_bypass(url): + """ + Bypass Getty Images watermarks + """ + try: + res = downloaderla(url, "https://getpaidstock.com/api.php") + result = decrypt(res, "#") + + if result: + return result + else: + return "Error: Could not bypass Getty Images watermark" + + except Exception as e: + return f"Error bypassing Getty Images: {str(e)}" + +# Common export function name +process_url = getty_bypass diff --git a/src/sites/freewall/medium.py b/src/sites/freewall/medium.py new file mode 100644 index 00000000..c76f0c94 --- /dev/null +++ b/src/sites/freewall/medium.py @@ -0,0 +1,48 @@ +""" +Medium paywall bypasser +""" + +import requests +import urllib.parse + +# Site configuration +SITE_NAME = "Medium" +URL_PATTERNS = [ + r'medium\.com/@', + r'medium\.com/p/', + r'[^/]+\.medium\.com' +] + +def bypass_medium_paywall(url): + """ + Bypass Medium paywall using archive services + """ + try: + # Method 1: Try Freedium + freedium_url = f"https://freedium.cfd/{url}" + + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' + } + + response = requests.head(freedium_url, headers=headers, timeout=10) + if response.status_code == 200: + return freedium_url + + # Method 2: Try 12ft.io + twelve_ft_url = f"https://12ft.io/{url}" + response = requests.head(twelve_ft_url, headers=headers, timeout=10) + if response.status_code == 200: + return twelve_ft_url + + # Method 3: Try Archive.today + encoded_url = urllib.parse.quote(url, safe='') + archive_url = f"https://archive.today/?run=1&url={encoded_url}" + + return archive_url + + except Exception as e: + return f"Error bypassing Medium paywall: {str(e)}" + +# Common export function name +process_url = bypass_medium_paywall diff --git a/src/sites/freewall/nytimes.py b/src/sites/freewall/nytimes.py new file mode 100644 index 00000000..a68d4e5f --- /dev/null +++ b/src/sites/freewall/nytimes.py @@ -0,0 +1,42 @@ +""" +NYTimes paywall bypasser +""" + +import requests +import urllib.parse + +# Site configuration +SITE_NAME = "New York Times" +URL_PATTERNS = [ + r'nytimes\.com/' +] + +def bypass_nytimes_paywall(url): + """ + Bypass New York Times paywall using archive services + """ + try: + # Method 1: Try 12ft.io + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' + } + + twelve_ft_url = f"https://12ft.io/{url}" + response = requests.head(twelve_ft_url, headers=headers, timeout=10) + if response.status_code == 200: + return twelve_ft_url + + # Method 2: Try Archive.today + encoded_url = urllib.parse.quote(url, safe='') + archive_url = f"https://archive.today/?run=1&url={encoded_url}" + + # Method 3: Try Wayback Machine + wayback_url = f"https://web.archive.org/web/{url}" + + return f"Try these NYTimes bypass options:\n1. {twelve_ft_url}\n2. {archive_url}\n3. {wayback_url}" + + except Exception as e: + return f"Error bypassing NYTimes paywall: {str(e)}" + +# Common export function name +process_url = bypass_nytimes_paywall diff --git a/src/sites/freewall/picfair.py b/src/sites/freewall/picfair.py new file mode 100644 index 00000000..d89ae263 --- /dev/null +++ b/src/sites/freewall/picfair.py @@ -0,0 +1,21 @@ +"""Picfair image downloader module""" + +from core.utils import downloaderla, decrypt + +SITE_NAME = "Picfair" +URL_PATTERNS = [r"picfair\.com"] + +def process_url(url: str) -> str: + """Download watermark-free images from Picfair + + Args: + url: Picfair image URL + + Returns: + Direct download link or error message + """ + try: + res = downloaderla(url, "https://downloader.la/picf.php") + return decrypt(res, "?newURL=") + except Exception as e: + return f"ERROR: {e.__class__.__name__}" diff --git a/src/sites/freewall/shutterstock.py b/src/sites/freewall/shutterstock.py new file mode 100644 index 00000000..7da32b80 --- /dev/null +++ b/src/sites/freewall/shutterstock.py @@ -0,0 +1,32 @@ +""" +Shutterstock image bypasser +""" + +import requests + +# Site configuration +SITE_NAME = "Shutterstock" +URL_PATTERNS = [ + r'shutterstock\.com/' +] + +def shutterstock_bypass(url): + """ + Bypass Shutterstock watermarks + """ + try: + # Note: This requires RecaptchaV3 token which isn't available + # For now, return a simple implementation + params = { + "url": url, + } + + # This would normally use a service like ttthreads.net + # But we'll provide a fallback implementation + return f"Shutterstock bypass not fully implemented for: {url}" + + except Exception as e: + return f"Error bypassing Shutterstock: {str(e)}" + +# Common export function name +process_url = shutterstock_bypass diff --git a/src/sites/freewall/slideshare.py b/src/sites/freewall/slideshare.py new file mode 100644 index 00000000..6e9f66ed --- /dev/null +++ b/src/sites/freewall/slideshare.py @@ -0,0 +1,36 @@ +""" +Slideshare presentation downloader +""" + +import requests + +# Site configuration +SITE_NAME = "Slideshare" +URL_PATTERNS = [ + r'slideshare\.net/' +] + +def slideshare_bypass(url, file_type="pptx"): + """ + Download Slideshare presentations + """ + try: + # enum = {"pdf","pptx","img"} + if file_type not in ["pdf", "pptx", "img"]: + file_type = "pptx" + + response = requests.get( + f"https://downloader.at/convert2{file_type}.php", + params={"url": url} + ) + + if response.status_code == 200: + return f"Slideshare content downloaded as {file_type}" + else: + return "Error: Could not download Slideshare presentation" + + except Exception as e: + return f"Error downloading Slideshare: {str(e)}" + +# Common export function name +process_url = slideshare_bypass diff --git a/src/sites/freewall/wsj.py b/src/sites/freewall/wsj.py new file mode 100644 index 00000000..50037098 --- /dev/null +++ b/src/sites/freewall/wsj.py @@ -0,0 +1,43 @@ +""" +Wall Street Journal paywall bypasser +""" + +import requests +import urllib.parse + +# Site configuration +SITE_NAME = "Wall Street Journal" +URL_PATTERNS = [ + r'wsj\.com/articles/', + r'wsj\.com/.*' +] + +def bypass_wsj_paywall(url): + """ + Bypass Wall Street Journal paywall using archive services + """ + try: + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' + } + + # Method 1: Try 12ft.io + twelve_ft_url = f"https://12ft.io/{url}" + response = requests.head(twelve_ft_url, headers=headers, timeout=10) + if response.status_code == 200: + return twelve_ft_url + + # Method 2: Try Archive.today + encoded_url = urllib.parse.quote(url, safe='') + archive_url = f"https://archive.today/?run=1&url={encoded_url}" + + # Method 3: Try Google Cache + google_cache = f"https://webcache.googleusercontent.com/search?q=cache:{url}" + + return f"WSJ paywall bypass options:\n1. {twelve_ft_url}\n2. {archive_url}\n3. {google_cache}" + + except Exception as e: + return f"Error bypassing WSJ paywall: {str(e)}" + +# Common export function name +process_url = bypass_wsj_paywall diff --git a/src/templates/index.html b/src/templates/index.html new file mode 100644 index 00000000..4a5abf82 --- /dev/null +++ b/src/templates/index.html @@ -0,0 +1,274 @@ + + + + + + Link Bypasser + + + +
+
+

Link Bypasser

+ {% with a=bypasser_sites|length, b=ddl_sites|length, c=freewall_sites|length %} +

Supports {{ a + b + c }} sites total

+ {% endwith %} +
+ +
+
+ + +
+
+ + {% if result %} +
+ {{ result }} +
+ {% endif %} + +
+
+

+ + + + Bypassers ({{ bypasser_sites|length }} sites) +

+
    + {% for site in bypasser_sites %} +
  • {{ site }}
  • + {% endfor %} +
+
+ +
+

+ + + + + + DDL Sites ({{ ddl_sites|length }} sites) +

+
    + {% for site in ddl_sites %} +
  • {{ site }}
  • + {% endfor %} +
+
+ +
+

+ + + + Freewall ({{ freewall_sites|length }} sites) +

+
    + {% for site in freewall_sites %} +
  • {{ site }}
  • + {% endfor %} +
+
+
+
+ + diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index 6f009df8..00000000 --- a/templates/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - Web Link Bypasser - - - - - - - - - - -
-
-
-

Link Bypasser Web

-
-
-
-
-
- -
- -
-
-
-
-
-
- {% if result %} - - {% endif %} -
- {% if prev_links %} -
- Previously Shortened Links: -
    - {% for prev_link in prev_links[::-1] %} - {% if prev_link.strip() %} -
  • - {{ prev_link }} -
  • - {% endif %} - {% endfor %} -
-
- {% endif %} -
-

If you encounter any problems, click here to report.

-
-

Designed and made by Sujal Patel with Bipinkrish

-
-
- -
-
- - - - diff --git a/texts.py b/texts.py deleted file mode 100644 index 50bbb5a5..00000000 --- a/texts.py +++ /dev/null @@ -1,137 +0,0 @@ -gdrivetext = """__- appdrive \n\ -- driveapp \n\ -- drivehub \n\ -- gdflix \n\ -- drivesharer \n\ -- drivebit \n\ -- drivelinks \n\ -- driveace \n\ -- drivepro \n\ -- driveseed \n\ - __""" - - -otherstext = """__- exe, exey \n\ -- sub2unlock, sub2unlock \n\ -- rekonise \n\ -- letsboost \n\ -- phapps2app \n\ -- mboost \n\ -- sub4unlock \n\ -- ytsubme \n\ -- bitly \n\ -- social-unlock \n\ -- boost \n\ -- gooly \n\ -- shrto \n\ -- tinyurl - __""" - - -ddltext = """__- yandex \n\ -- mediafire \n\ -- uptobox \n\ -- osdn \n\ -- github \n\ -- hxfile \n\ -- 1drv (onedrive) \n\ -- pixeldrain \n\ -- antfiles \n\ -- streamtape \n\ -- racaty \n\ -- 1fichier \n\ -- solidfiles \n\ -- krakenfiles \n\ -- upload \n\ -- akmfiles \n\ -- linkbox \n\ -- shrdsk \n\ -- letsupload \n\ -- zippyshare \n\ -- wetransfer \n\ -- terabox, teraboxapp, 4funbox, mirrobox, nephobox, momerybox \n\ -- filepress \n\ -- anonfiles, hotfile, bayfiles, megaupload, letsupload, filechan, myfile, vshare, rapidshare, lolabits, openload, share-online, upvid \n\ -- fembed, fembed, femax20, fcdn, feurl, layarkacaxxi, naniplay, nanime, naniplay, mm9842 \n\ -- sbembed, watchsb, streamsb, sbplay. - __""" - - -shortnertext = """__- igg-games \n\ -- olamovies\n\ -- katdrive \n\ -- drivefire\n\ -- kolop \n\ -- hubdrive \n\ -- filecrypt \n\ -- shareus \n\ -- shortingly \n\ -- gyanilinks \n\ -- shorte \n\ -- psa \n\ -- sharer \n\ -- new1.gdtot \n\ -- adfly\n\ -- gplinks\n\ -- droplink \n\ -- linkvertise \n\ -- rocklinks \n\ -- ouo \n\ -- try2link \n\ -- htpmovies \n\ -- sharespark \n\ -- cinevood\n\ -- atishmkv \n\ -- urlsopen \n\ -- xpshort, techymozo \n\ -- dulink \n\ -- ez4short \n\ -- krownlinks \n\ -- teluguflix \n\ -- taemovies \n\ -- toonworld4all \n\ -- animeremux \n\ -- adrinolinks \n\ -- tnlink \n\ -- flashlink \n\ -- short2url \n\ -- tinyfy \n\ -- mdiskshortners \n\ -- earnl \n\ -- moneykamalo \n\ -- easysky \n\ -- indiurl \n\ -- linkbnao \n\ -- mdiskpro \n\ -- tnshort \n\ -- indianshortner \n\ -- rslinks \n\ -- bitly, tinyurl \n\ -- thinfi \n\ -- pdisk \n\ -- vnshortener \n\ -- onepagelink \n\ -- lolshort \n\ -- tnvalue \n\ -- vipurl \n\ -__""" - - -freewalltext = """__- shutterstock \n\ -- adobe stock \n\ -- drivehub \n\ -- alamy \n\ -- gettyimages \n\ -- istockphoto \n\ -- picfair \n\ -- slideshare \n\ -- medium \n\ - __""" - - -HELP_TEXT = f"**--Just Send me any Supported Links From Below Mentioned Sites--** \n\n\ -**List of Sites for DDL : ** \n\n{ddltext} \n\ -**List of Sites for Shortners : ** \n\n{shortnertext} \n\ -**List of Sites for GDrive Look-ALike : ** \n\n{gdrivetext} \n\ -**List of Sites for Jumping Paywall : ** \n\n{freewalltext} \n\ -**Other Supported Sites : ** \n\n{otherstext}"