Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced download functionality for yt-dlp unsupported links #363

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

SanujaNS
Copy link
Collaborator

@SanujaNS SanujaNS commented Mar 16, 2024

Moved download_instagram function to new file called sp_downloader.py that now on handle all links that yt-dlp doesn’t support.
Added pixeldrain.com as the first step.
yt-dlp version bump to new release 2024.03.10

@BennyThink BennyThink added the enhancement New feature or request label Mar 17, 2024
]
):
return False
if "www.instagram.com" in domain:

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

The string
www.instagram.com
may be at an arbitrary position in the sanitized URL.
return False
if "www.instagram.com" in domain:
return instagram(url, tempdir)
elif "pixeldrain.com" in domain:

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

The string
pixeldrain.com
may be at an arbitrary position in the sanitized URL.
ytdlbot/sp_downloader.py Dismissed Show dismissed Hide dismissed
ytdlbot/sp_downloader.py Show resolved Hide resolved
return xasiat(url, tempdir)


def sp_ytdl_download(url: str, tempdir: str):
Copy link
Member

Choose a reason for hiding this comment

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

the code in this function appears to be much duplicated comparing with the one in downloader.py. Anyway we can avoid those duplicates?

Copy link
Collaborator Author

@SanujaNS SanujaNS Mar 21, 2024

Choose a reason for hiding this comment

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

Yes, It's the same function striped some parts. It would be great if we can call the function in downloader.py but I can't think of a way without it looping itself because some URLs(even tho it's direct URL) include domain parts used in handling function(sp_dl).

@BennyThink BennyThink self-assigned this Mar 18, 2024
@BennyThink
Copy link
Member

Sorry for the long delay. Generally speaking it seems okay, I will merge it to master in a day or two

@SanujaNS
Copy link
Collaborator Author

SanujaNS commented Apr 8, 2024

Sorry for the long delay. Generally speaking it seems okay, I will merge it to master in a day or two

No worries at all; I completely understand that we're all busy with our lives. It's been my pleasure to contribute, even in a small way, to the development of a software that I use and enjoy every day. Thank you for considering my contribution.

By the way, I still haven't been able to figure out that weird Instagram link bug. If possible, could you please take a look into it before merging? Your expertise might help resolve the issue.

@BennyThink BennyThink changed the base branch from master to dev April 8, 2024 15:52
@BennyThink BennyThink merged commit 0547fc6 into tgbot-collection:dev Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants