Skip to content

Commit

Permalink
add config for ssyoutube
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Jun 11, 2023
1 parent ba85246 commit af322dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ytdlbot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@
RATE_LIMIT = os.getenv("RATE_LIMIT", 20)

DSN = os.getenv("DSN")
SS_YOUTUBE = os.getenv("SS_YOUTUBE", "https://ytdlbot.dmesg.app?token=123456")
4 changes: 2 additions & 2 deletions ytdlbot/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import yt_dlp as ytdl
from tqdm import tqdm

from config import AUDIO_FORMAT, ENABLE_ARIA2, ENABLE_FFMPEG, TG_MAX_SIZE, IPv6, TOKEN
from config import AUDIO_FORMAT, ENABLE_ARIA2, ENABLE_FFMPEG, TG_MAX_SIZE, IPv6, SS_YOUTUBE
from limit import Payment
from utils import adjust_formats, apply_log_formatter, current_time, sizeof_fmt

Expand Down Expand Up @@ -247,7 +247,7 @@ def convert_audio_format(video_paths: list, bm):
def download_instagram(url: str, tempdir: str):
if url.startswith("https://www.instagram.com"):
logging.info("Requesting instagram download link for %s", url)
api = f"https://ytdlbot.dmesg.app?token={TOKEN}&url={url}"
api = SS_YOUTUBE + f"&url={url}"
res = requests.get(api).json()
if isinstance(res, dict):
downloadable = {i["url"]: i["ext"] for i in res["url"]}
Expand Down

2 comments on commit af322dc

@SanujaNS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain a bit about this SS_YOUTUBE config entry. Do we have to get a token?
With this ''https://ytdlbot.dmesg.app/?token=123456&url=https://www.instagram.com/p/ClBSqo3PkJw/'', I get '''error : "key error" '''.
Is there a reason you changed from this "https://ssmstore.store/rami/index.php?url=https://www.instagram.com/p/ClBSqo3PkJw/"?

@BennyThink
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a private deployment of ssyoutube.com with scrapers.

Please sign in to comment.