Merge pull request #378 from cyian-1756/ig-options

instagram ripper can now be made to skip videos
This commit is contained in:
cyian-1756 2018-01-06 14:05:57 -05:00 committed by GitHub
commit 1ebaaca823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,8 @@ import com.rarchives.ripme.utils.Http;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import com.rarchives.ripme.ui.RipStatusMessage;
import com.rarchives.ripme.utils.Utils;
public class InstagramRipper extends AbstractHTMLRipper {
@ -234,7 +236,11 @@ public class InstagramRipper extends AbstractHTMLRipper {
}
addURLToDownload(new URL(getOriginalUrl(data.getString("thumbnail_src"))), image_date);
} else {
addURLToDownload(new URL(getVideoFromPage(data.getString("code"))), image_date);
if (!Utils.getConfigBoolean("instagram.download_images_only", false)) {
addURLToDownload(new URL(getVideoFromPage(data.getString("code"))), image_date);
} else {
sendUpdate(RipStatusMessage.STATUS.DOWNLOAD_WARN, "Skipping video " + data.getString("code"));
}
}
} catch (MalformedURLException e) {
return imageURLs;