Skip to content

Commit

Permalink
fix instagram api
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed May 20, 2023
1 parent 2b9a6c7 commit 941cc06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ https://twitter.com/BennyThinks/status/1475836588542341124
## Test instagram

https://www.instagram.com/p/ClBSqo3PkJw/

https://www.instagram.com/p/CaiAHoWDnrM/

https://www.instagram.com/p/CZtUDyyv1u1/

# Donation
Expand Down
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
from config import AUDIO_FORMAT, ENABLE_ARIA2, ENABLE_FFMPEG, TG_MAX_SIZE, IPv6, TOKEN
from limit import Payment
from utils import adjust_formats, apply_log_formatter, current_time, sizeof_fmt

Expand Down Expand Up @@ -246,7 +246,7 @@ def convert_audio_format(video_paths: list, bm):

def download_instagram(url: str, tempdir: str):
if url.startswith("https://www.instagram.com"):
api = f"https://ssmstore.store/rami/index.php?url={url}"
api = f"https://ytdlbot.dmesg.app?token={TOKEN}&url={url}"
res = requests.get(api).json()
if isinstance(res, dict):
downloadable = {i["url"]: i["ext"] for i in res["url"]}
Expand Down
2 changes: 1 addition & 1 deletion ytdlbot/ytdl_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def generate_invoice(amount: int, title: str, description: str, payload: str):


def search(kw: str):
api = f"https://dmesg.app/ytdlbot.php?search={kw}"
api = f"https://dmesg.app/ytdlbot/search.php?search={kw}"
# title, url, time, image
text, index = "", 1
for item in requests.get(api).json()["results"][:10]:
Expand Down

0 comments on commit 941cc06

Please sign in to comment.