Code Monkey home page Code Monkey logo

link-media-scraper-bot's Introduction

link-media-scraper-bot

A Telegram bot that used to download or upload the media contents from cyberdrop, bunkr and streamtape links.

Simply Deploy on Heroku (Easier Way):

Deploy

Supported Handlers and Features :

  • /cyberdrop [link] For cyberdrop folder/album links
  • /bunkr [link] For bunkr folder/album links
  • /streamdl [link] For streamtape leeching. see environment variable section before using this command
  • Send any video to upload it to streamtape. see environment variable section before using ...
  • /ping Check latency
  • /help To know about commands

Deploy Locally :

Termux:

git clone https://github.com/DebXD/link-media-scraper-bot
cd link-media-scraper-bot
  • Install the required libraries :
pip3 install wheel
apt install libxml2 libxslt wget ffmepg
pip3 install -r requirements.txt
  • If Pillow Installation Fails on Termux Run this :
apt install libjpeg-turbo
LDFLAGS="-L/system/lib64/" CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install Pillow

Linux :

 git clone https://github.com/DebXD/link-media-scraper-bot
 cd link-media-scraper-bot
 pip3 install -r requirements.txt

Environmet Variables :

    • API ID (Required) : Your Telegram account API_ID, Get it from my.telegram.org
    • API HASH (Required) : Your Telegram account API_HASH, Get it from my.telegram.org
    • BOT TOKEN (Required) : The Token of Your Bot, Get it from BotFather
  • LOG CHAT ID (Optional) : Your CHAT_ID where you want to get bot run notification.

  • API USERNAME (Optional) : Your streamtape API USERNAME from account panel to access the streamtape functionalities.

  • API PASSWORD (Optional) : Your streamtape API PASSWORD from account panel to access the streamtape functionalities.

  • HTTP/HTTPS PROXY (Optional) : Your PROXY Sign Up and get the retotaing proxy if bunkr command(handler) crashes.

Usage:

  • Paste these variable in example.env and rename it to .env afterwards. Do not add inverted comma or quotes.

Run:

$ python3 bot.py

That's it.

  • Feel free to report any issues you have faced.
    Thanks for Using.

link-media-scraper-bot's People

Contributors

debxd avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

link-media-scraper-bot's Issues

PEER_ID_INVALID

bot crashes upon send_message method chat_id string param but not with int param

TypeError: 'NoneType' object is not iterable

How to reproduce the problem:

I start my bot with /start and i paste /bunkr https://cdn10.bunkr.ru/clipart3265712-jK0fpMZR.png

python3 bot.py
https://cdn10.bunkr.ru/clipart3265712-jK0fpMZR.png
https://cdn10.bunkr.ru/clipart3265712-jK0fpMZR.png
'NoneType' object is not iterable
Traceback (most recent call last):
File "/home/tbot/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 242, in handler_worker
await self.loop.run_in_executor(
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "bot.py", line 48, in send_bunkrmedia
handlers.bunkr.exec_bunkr(client, message)
File "/home/tbot/handlers/bunkr.py", line 27, in exec_bunkr
url_list = helpers.bunkr_scraper.bunkr_scraper(text)
File "/home/tbot/helpers/bunkr_scraper.py", line 19, in bunkr_scraper
for i in script:
TypeError: 'NoneType' object is not iterable

API_ID not found. Declare it as envvar or define a default value.

MacBook-Pro link-media-scraper-bot % python3 bot.py
Traceback (most recent call last):
File "/Users/**/Desktop/LM/link-media-scraper-bot/bot.py", line 6, in
import session.session_gen
File "/Users/**Desktop/LM/link-media-scraper-bot/session/session_gen.py", line 4, in
api_id = config("API_ID")
File "/opt/homebrew/lib/python3.10/site-packages/decouple.py", line 243, in call
return self.config(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/decouple.py", line 105, in call
return self.get(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/decouple.py", line 90, in get
raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
decouple.UndefinedValueError: API_ID not found. Declare it as envvar or define a default value.

can you help me understand where I am going wrong. Thanks

sqlite3.OperationalError: database is locked

Traceback (most recent call last):
File "bot.py", line 17, in
app = session.session_gen.gen_session()
File "/home/tbot/session/session_gen.py", line 10, in gen_session
with app:
File "/home/tbot/lib/python3.8/site-packages/pyrogram/client.py", line 280, in enter
return self.start()
File "/home/tbot/lib/python3.8/site-packages/pyrogram/sync.py", line 66, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/tbot/lib/python3.8/site-packages/pyrogram/methods/utilities/start.py", line 58, in start
is_authorized = await self.connect()
File "/home/tbot/lib/python3.8/site-packages/pyrogram/methods/auth/connect.py", line 40, in connect
await self.load_session()
File "/home/tbot/lib/python3.8/site-packages/pyrogram/client.py", line 563, in load_session
await self.storage.open()
File "/home/tbot/lib/python3.8/site-packages/pyrogram/storage/file_storage.py", line 63, in open
self.update()
File "/home/tbot/lib/python3.8/site-packages/pyrogram/storage/file_storage.py", line 52, in update
self.version(version)
File "/home/tbot/lib/python3.8/site-packages/pyrogram/storage/sqlite_storage.py", line 224, in version
self.conn.execute(
sqlite3.OperationalError: database is locked

bunkr downloading not working

when i try to download album with videos, bot scraping all links but cant download it
Im getting this error:
Downloading....mp4
Processing Thumbnail
No video found
expected str, bytes or os.PathLike object, not NoneType

Proxy

always getting proxy error

plz give tutorial for heroku

thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.