1010import java .util .regex .Pattern ;
1111
1212import com .rarchives .ripme .ripper .AbstractRipper ;
13- import com .rarchives .ripme .ripper .rippers .EroShareRipper ;
1413import com .rarchives .ripme .ripper .rippers .EromeRipper ;
1514import com .rarchives .ripme .ripper .rippers .ImgurRipper ;
1615import com .rarchives .ripme .ripper .rippers .RedgifsRipper ;
@@ -31,9 +30,9 @@ public static List<URL> getFilesFromURL(URL url) {
3130 List <URL > result = new ArrayList <>();
3231
3332 logger .debug ("Checking " + url );
34- // Imgur album
3533 if ((url .getHost ().endsWith ("imgur.com" ))
3634 && url .toExternalForm ().contains ("imgur.com/a/" )) {
35+ // Imgur album
3736 try {
3837 logger .debug ("Fetching imgur album at " + url );
3938 ImgurRipper .ImgurAlbum imgurAlbum = ImgurRipper .getImgurAlbum (url );
@@ -45,18 +44,15 @@ public static List<URL> getFilesFromURL(URL url) {
4544 logger .error ("[!] Exception while loading album " + url , e );
4645 }
4746 return result ;
48- }
49- else if (url .getHost ().endsWith ("i.imgur.com" ) && url .toExternalForm ().contains ("gifv" )) {
47+ } else if (url .getHost ().endsWith ("i.imgur.com" ) && url .toExternalForm ().contains ("gifv" )) {
5048 // links to imgur gifvs
5149 try {
5250 result .add (new URI (url .toExternalForm ().replaceAll (".gifv" , ".mp4" )).toURL ());
5351 } catch (IOException | URISyntaxException e ) {
5452 logger .info ("Couldn't get gifv from " + url );
5553 }
5654 return result ;
57-
58- }
59- else if (url .getHost ().endsWith ("redgifs.com" ) || url .getHost ().endsWith ("gifdeliverynetwork.com" )) {
55+ } else if (url .getHost ().endsWith ("redgifs.com" ) || url .getHost ().endsWith ("gifdeliverynetwork.com" )) {
6056 try {
6157 logger .debug ("Fetching redgifs page " + url );
6258 String videoURL = RedgifsRipper .getVideoURL (url );
@@ -67,8 +63,7 @@ else if (url.getHost().endsWith("redgifs.com") || url.getHost().endsWith("gifdel
6763 logger .warn ("Exception while retrieving redgifs page:" , e );
6864 }
6965 return result ;
70- }
71- else if (url .toExternalForm ().contains ("vidble.com/album/" ) || url .toExternalForm ().contains ("vidble.com/show/" )) {
66+ } else if (url .toExternalForm ().contains ("vidble.com/album/" ) || url .toExternalForm ().contains ("vidble.com/show/" )) {
7267 try {
7368 logger .info ("Getting vidble album " + url );
7469 result .addAll (VidbleRipper .getURLsFromPage (url ));
@@ -77,22 +72,10 @@ else if (url.toExternalForm().contains("vidble.com/album/") || url.toExternalFor
7772 logger .warn ("Exception while retrieving vidble page:" , e );
7873 }
7974 return result ;
80- }
81- else if (url .toExternalForm ().contains ("eroshare.com" )) {
82- try {
83- logger .info ("Getting eroshare album " + url );
84- result .addAll (EroShareRipper .getURLs (url ));
85- } catch (IOException | URISyntaxException e ) {
86- // Do nothing
87- logger .warn ("Exception while retrieving eroshare page:" , e );
88- }
89- return result ;
9075 } else if (url .toExternalForm ().contains ("v.redd.it" )) {
9176 result .add (url );
9277 return result ;
93- }
94-
95- else if (url .toExternalForm ().contains ("erome.com" )) {
78+ } else if (url .toExternalForm ().contains ("erome.com" )) {
9679 try {
9780 logger .info ("Getting eroshare album " + url );
9881 EromeRipper r = new EromeRipper (url );
@@ -105,8 +88,7 @@ else if (url.toExternalForm().contains("erome.com")) {
10588 logger .warn ("Exception while retrieving eroshare page:" , e );
10689 }
10790 return result ;
108- }
109- else if (url .toExternalForm ().contains ("soundgasm.net" )) {
91+ } else if (url .toExternalForm ().contains ("soundgasm.net" )) {
11092 try {
11193 logger .info ("Getting soundgasm page " + url );
11294 SoundgasmRipper r = new SoundgasmRipper (url );
0 commit comments