Mass file downloader for reddit
Note that authentication is not required unless accessing private things like upvoted posts, saved posts, and private multireddits. To authenticate, the BDFR will first look for a token in the configuration file that signals that there's been a previous authentication.
If this is not there, then the BDFR will attempt to register itself with your account. This is normal, and if you run the program, it will pause and show a Reddit URL. Click on this URL and it will take you to Reddit, where the permissions being requested will be shown.
Read this and confirm that there are no more permissions than needed to run the program. You should not grant unneeded permissions; by default, the BDFR only requests permission to read your saved or upvoted submissions and identify as you.
If the permissions look safe, confirm it, and the BDFR will save a token that will allow it to authenticate with Reddit from then on. Most users will not need to do anything extra to use any of the current features. However, if additional features such as scraping messages, PMs, etc are added in the future, these will require additional scopes.
There is normally no need to do this, but it is allowed by the BDFR. These can all be changed if the user wishes, however do not do so if you don't know what you are doing.
The defaults are specifically chosen to have a very low security risk if your token were to be compromised, however unlikely that actually is. Never grant more permissions than you absolutely need.
For more details on the configuration file and the values therein, see Configuration Files. The naming and folder schemes for the BDFR are both completely customisable. A number of different fields can be given which will be replaced with properties from a submission when downloading it. For example, the previous string will result in the following submission file names:. At least one key must be included in the file scheme, otherwise an error will be thrown.
The folder scheme however, can be null or a simple static string. In the former case, all files will be placed in the folder specified with the directory argument. If the folder scheme is a static string, then all submissions will be placed in a folder of that name. In both cases, there will be no separation between all submissions. No combination of other keys will necessarily be unique and may result in posts being skipped as the BDFR will see files by the same name and skip the download, assuming that they are already downloaded.
The configuration files are, by default, stored in the configuration directory for the user. For Windows, this will be:. If Python has been installed through the Windows Store, the folder will appear in a different place. Note that the hash included in the file path may change from installation to installation. If you need to submit a bug, it is this file that you will need to submit with the report. The config. At the moment, the following keys must be included in the configuration file supplied.
All of these should not be modified unless you know what you're doing, as the default values will enable the BDFR to function just fine. A configuration is included in the BDFR when it is installed, and this will be placed in the configuration directory as the default. Most of these values have to do with OAuth2 configuration and authorisation. The logs in the configuration directory can be verbose and for long runs of the BDFR, can grow quite large.
To combat this, the BDFR will overwrite previous logs. This value determines how many previous run logs will be kept. The default is 3, which means that the BDFR will keep at most three past logs plus the current one. Any runs past this will overwrite the oldest log file, called "rolling over". If you want more records of past runs, increase this number. By default, this is the ISO format which is highly recommended due to its standardised nature.
If you don't need to change it, it is recommended that you do not. However, you can specify it to anything required with this option. The --time-format option supersedes any specification in the configuration file. The format can be specified through the format codes that are standard in the Python datetime library.
The individual modules of the BDFR, used to download submissions from websites, can be disabled. This is helpful especially in the case of the fallback downloaders, since the --skip-domain option cannot be effectively used in these cases. For example, the Youtube-DL downloader can retrieve data from hundreds of websites and domains; thus the only way to fully disable it is via the --disable-module option.
The list of downloaders that can be disabled are the following. Note that they are case-insensitive. There are certain HTTP errors that mean that no amount of requests will return the wanted data, but some errors are from rate-limiting. This is when a single client is making so many requests that the remote website cuts the client off to preserve the function of the site. This is a common situation when downloading many resources from the same site. It is polite and best practice to obey the website's wishes in these cases.
To this end, the BDFR will sleep for a time before retrying the download, giving the remote server time to "rest". This is done in 60 second increments.
For example, if a rate-limiting-related error is given, the BDFR will sleep for 60 seconds before retrying. Then, if the same type of error occurs, it will sleep for another seconds, then seconds, and so on. If both are present, the command-line option takes precedence. For instance, the default is , so the BDFR will wait for 60 seconds, then seconds, and then move one. Note that this results in a total time of seconds trying the same download. If you wish to try to bypass the rate-limiting system on the remote site, increasing the maximum wait time may help.
However, note that the actual wait times increase exponentially if the resource is not downloaded i. The BDFR can be run in multiple instances with multiple configurations, either concurrently or consecutively. The use of scripting files facilitates this the easiest, either Powershell on Windows operating systems or Bash elsewhere.
This allows multiple scenarios to be run with data being scraped from different sources, as any two sets of scenarios might be mutually exclusive i. To download from multiple users for example, multiple runs of the BDFR are required.
Running these scenarios consecutively is done easily, like any single run. Configuration files that differ may be specified with the --config option to switch between tokens, for example. Otherwise, almost all configuration for data sources can be specified per-run through the command line. Running scenarious concurrently at the same time however, is more complicated. The BDFR will look to a single, static place to put the detailed log files, in a directory with the configuration file specified above.
If there are multiple instances, or processes, of the BDFR running at the same time, they will all be trying to write to a single file.
On Linux and other UNIX based operating systems, this will succeed, though there is a substantial risk that the logfile will be useless due to garbled and jumbled data. On Windows however, attempting this will raise an error that crashes the program as Windows forbids multiple processes from accessing the same file.
Download "Documents by Readdle" from the App store. Copy and paste the HD download link on the Documents browser.
How can I download reddit videos on Android? You can download reddit videos on android by following the steps provided under our how to section. What to do if video doesn't download but plays instead? If you are on mobile, tap and hold the video until download option pops up. On desktop, right-click on the video and select Save Link as option.
Downloaded reddit video has no sound, why? Some reddit videos have no sound or it might be an animated gif. Where are the files I downloaded on my device? All downloaded videos are stored in your device's default download folder. Why can't I download a reddit video?