mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-11 16:34:04 +02:00
ChanRipper: Add a delay before downloading videos to avoid rate limiting related to specifically videos (fixes #2049) (#2112)
This commit is contained in:
@@ -279,8 +279,16 @@ public class ChanRipper extends AbstractHTMLRipper {
|
||||
return imageURLs;
|
||||
}
|
||||
|
||||
private boolean isVideo(URL url) {
|
||||
String urlString = url.toExternalForm();
|
||||
return urlString.endsWith(".webm") || urlString.endsWith(".mp4");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadURL(URL url, int index) {
|
||||
if (isVideo(url)) {
|
||||
sleep(5000);
|
||||
}
|
||||
addURLToDownload(url, getPrefix(index));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user