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

Feature Request: Allow video_url to be from v.redd.it #5

Closed
bcornw2 opened this issue Jun 25, 2020 · 2 comments
Closed

Feature Request: Allow video_url to be from v.redd.it #5

bcornw2 opened this issue Jun 25, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@bcornw2
Copy link

bcornw2 commented Jun 25, 2020

Right now this only works with the full reddit permalink: https://reddit.com/r/subreddit/post-title-goes here

It would be useful to be able to use this with the "https://v.redd.it" URL, for example: https://v.redd.it/c8oic7ppc2751

I've got it working with the following workaround:

submissions = reddit.user.me().submissions.new(limit=None)
  for submission in submissions:
    if "v.redd" in submission.url:
      video_url = "https://reddit.com" + submission.permalink   #permalink comes in "/r/subreddit/post-title" format, so this string combination creates the requisite URL
     redvid.Download(video_url)

@elmoiv elmoiv added the enhancement New feature or request label Jun 26, 2020
@elmoiv
Copy link
Owner

elmoiv commented Jun 30, 2020

Added this feature too :)

...
        # Allow v.redd.it url formats
        if 'v.redd.it' in self.url:
            self.url = self.get(self.url, _proxies=self.proxies).url
        
        self.page = se...
...

I am cleaning my code now and will upload the new version ASAP

@elmoiv
Copy link
Owner

elmoiv commented Jul 1, 2020

Feature added.

@elmoiv elmoiv closed this as completed Jul 1, 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