![]() #15 Fixed bug when fetching reddit videos with expiry date.#18 Fixed bug when handling path that caused recursive directories.#20 Added a feature to create a folder in case it does not exist.Set maximum video duration (different technique).Set maximum video size (different technique).Get best quality according to given size (Automated).( You may need to restart your pc after applying these steps) Linux: > python credvid.py -help usage: credvid.py -u URL Argument parser for redvid module required arguments: -u URL, -url URL Post URL for Reddit hosted video optional arguments: -p PATH, -path PATH Custom path for downloaded videos -o, -overwrite Overwrite existing videos and ignore exception -mxq, -maxquality Auto select maximum quality -mnq, -minquality Auto select minimum quality -mxd MAXDURATION, -maxduration MAXDURATION Ignore videos that exceed this duration (in seconds) -mxs MAXSIZE, -maxsize MAXSIZE Ignore videos that exceed this size (in bytes) -am, -automax Automatically download video with maximum size (Helps for old reddit videos with unknown qualities) -px PROXIES, -proxies PROXIES Download videos through proxies for blocked regionsįrom redvid import Downloader reddit = Downloader ( max_q = True ) reddit. Or, install the latest version of the package from GitHub: pip install git+ Use pip to install the package from PyPI: pip install redvid Download local hosted videos with audio.Might have to tackle it at some point.Smart downloader for Reddit hosted videos Features We could come up with some cool visualizations about how traffic spikes at certain times of the day or during certain days of the year. I think it would be interesting to come up with a fun data science project using the Reddit API at some point. This time, only the content is posted as part of the reply. This also works on comments (not just posts), but the difference is that there'd be no "Title:" message: Therefore, the title "Bittrex question: Is there a way to change the "% CHANGE" settings in the wallet display?" translates to ![]() The second starts with "Content:", followed by the content of the post. ![]() The first starts with "Title:", followed by the title of the post. Therefore, you can ask for a translation from a language you don't even recognize and get a response.Īssuming that most of you don't know Russian, the response is broken up into two parts. Note that the source language need not be specified, as it can be detected by Google Translate. You can see the call to u/BotTranslator and the request for Russian. It's a pretty straightforward process: you simply comment underneath a post or a comment with a call to the bot and the language you'd like to translate to, like so: Let's head to the CryptoMarkets subreddit to test this out. I was thrilled when I first got everything working and saw my translations appearing on the page! Demo I read all of the PRAW docs so that I could have a general understanding of what was going on and proceeded from there. I've since used dozens, but at the time I had no experience. The Reddit API was the first API I'd ever interacted with, so it was definitely a process of bumbling around a bit before I got my feet under me. The Google Translate API handled the translation itself, making translation available to and from any language that it supports. I used the Reddit API to read messages from the bots' inbox, find the right place to comment, and post the comment. I also browse r/programming often, and so I knew Reddit was a programmer friendly place. I will shamelessly admit that I'm a frequent Reddit browser, and so I'd seen plenty of bots commenting on random feeds and had to join the party. This was a project I'd been wanting to dig into for a little while. A bot that translates the text of any post or comment when called from any language to any language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |