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

Select custom quality without user intervention #11

Closed
IcyMint opened this issue Jul 30, 2020 · 5 comments
Closed

Select custom quality without user intervention #11

IcyMint opened this issue Jul 30, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@IcyMint
Copy link

IcyMint commented Jul 30, 2020

I'm in a situation where I would like to select the highest quality while being under the defined size limit. I can set quality to be highest or lowest but I can't find a way to retrieve the list of qualities from UserSelect or select a custom quality.
TL;DR: I was wondering if there was a way to select the highest quality under a given size limit, or at least be able to select a quality without needing user intervention.

@elmoiv
Copy link
Owner

elmoiv commented Aug 2, 2020

Hey @IcyMint ,

From what you said, I understood the following:

  • You want redvid to retrieve a list of qualities that you can access within your script instead of user intervention.
  • You want a feature that matches the given maximum size to highest possible quality.

Is that all you want, or I missed a thing?

@elmoiv elmoiv added the enhancement New feature or request label Aug 2, 2020
@IcyMint
Copy link
Author

IcyMint commented Aug 2, 2020

The second feature would be optimal but if it proves to be too involved the first one would be great. Either one would go a long way to solving the problem.

@elmoiv
Copy link
Owner

elmoiv commented Aug 2, 2020

Ok.
I will start working on your request ASAP.
Stay tuned :)

@elmoiv
Copy link
Owner

elmoiv commented Aug 25, 2020

Hey @IcyMint , sorry for adding this feature too late.

redvid now can match the given maximum size to highest possible quality.

To do this:

  • pip install redvid==1.1.0
  • Use the following form:
from redvid import Downloader

reddit = Downloader()
reddit.url = 'https://www.reddit.com/r/Unexpected/comments/9n8mmz/_/'

# redvid will find the quality with the size
# that does not exceed max_s (3 MB)
reddit.max_s = 3 * (1 << 20)

# Enable the "auto match" feature
reddit.auto_max = True

reddit.download()

If this solves your problem, kindly close this issue :)

@IcyMint
Copy link
Author

IcyMint commented Aug 25, 2020

Just tried it out and it works exactly as expected. Thanks a ton! 🥇

@IcyMint IcyMint closed this as completed Aug 25, 2020
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

No branches or pull requests

2 participants