@@ -255,8 +255,6 @@ public static ImgurAlbum getImgurAlbum(URL url) throws IOException, URISyntaxExc
255
255
LOGGER .info (" Retrieving " + strUrl );
256
256
Document doc = getAlbumData ("https://api.imgur.com/3/album/" + strUrl .split ("/a/" )[1 ]);
257
257
// Try to use embedded JSON to retrieve images
258
- LOGGER .info (Jsoup .clean (doc .body ().toString (), Safelist .none ()));
259
-
260
258
try {
261
259
JSONObject json = new JSONObject (Jsoup .clean (doc .body ().toString (), Safelist .none ()));
262
260
JSONArray jsonImages = json .getJSONObject ("data" ).getJSONArray ("images" );
@@ -427,7 +425,7 @@ private void ripUserImages(URL url) {
427
425
for (int i = 0 ; i < images .length (); i ++) {
428
426
imagesFound ++;
429
427
JSONObject image = images .getJSONObject (i );
430
- String imageUrl = "http ://i.imgur.com/" + image .getString ("hash" ) + image .getString ("ext" );
428
+ String imageUrl = "https ://i.imgur.com/" + image .getString ("hash" ) + image .getString ("ext" );
431
429
String prefix = "" ;
432
430
if (Utils .getConfigBoolean ("download.save_order" , true )) {
433
431
prefix = String .format ("%03d_" , imagesFound );
@@ -497,7 +495,7 @@ public String getGID(URL url) throws MalformedURLException, URISyntaxException {
497
495
// Imgur album or gallery
498
496
albumType = ALBUM_TYPE .ALBUM ;
499
497
String gid = m .group (m .groupCount ());
500
- this .url = new URI ("http ://imgur.com/a/" + gid ).toURL ();
498
+ this .url = new URI ("https ://imgur.com/a/" + gid ).toURL ();
501
499
return gid ;
502
500
}
503
501
// Match urls with path /a
@@ -507,7 +505,7 @@ public String getGID(URL url) throws MalformedURLException, URISyntaxException {
507
505
// Imgur album or gallery
508
506
albumType = ALBUM_TYPE .ALBUM ;
509
507
String gid = m .group (m .groupCount ());
510
- this .url = new URI ("http ://imgur.com/a/" + gid ).toURL ();
508
+ this .url = new URI ("https ://imgur.com/a/" + gid ).toURL ();
511
509
return gid ;
512
510
}
513
511
p = Pattern .compile ("^https?://([a-zA-Z0-9\\ -]{4,})\\ .imgur\\ .com/?$" );
@@ -563,7 +561,7 @@ public String getGID(URL url) throws MalformedURLException, URISyntaxException {
563
561
albumType = ALBUM_TYPE .ALBUM ;
564
562
String subreddit = m .group (m .groupCount () - 1 );
565
563
String gid = m .group (m .groupCount ());
566
- this .url = new URI ("http ://imgur.com/r/" + subreddit + "/" + gid ).toURL ();
564
+ this .url = new URI ("https ://imgur.com/r/" + subreddit + "/" + gid ).toURL ();
567
565
return "r_" + subreddit + "_" + gid ;
568
566
}
569
567
p = Pattern .compile ("^https?://(i\\ .|www\\ .|m\\ .)?imgur\\ .com/([a-zA-Z0-9]{5,})$" );
0 commit comments