RipMeApp / ripme

Downloads albums in bulk
MIT License
3.72k stars 631 forks source link

trouble with redgifs after update #1720

Open maybetrash opened 4 years ago

maybetrash commented 4 years ago

Expected Behavior

Detail the expected behavior here. Downloading https://thcf3.redgifs.com/HeavenlyPinkAsianpiedstarling.mp4

Actual Behavior

Detail the actual (incorrect) behavior here. You can post log snippets or attach log files to your issue report.
https://thcf3.redgifs.com/HeavenlyPinkAsianpiedstarling.mp4 : Failed to download https://thcf3.redgifs.com/HeavenlyPinkAsianpiedstarling.mp4

ghost commented 4 years ago

Same, fixed by creating function

    private static List<String> findStringsOf(String input, String tstart, String tend) {
        List<String> result = new ArrayList<>();

        Integer first = input.indexOf(tstart);
        while (first >= 0) {
            Integer f2 = first+tstart.length();
            Integer second = input.indexOf(tend,f2);
            result.add(input.substring(f2, second));

            first = input.indexOf(tstart, second);
        }

        return result;
    }

and replacing the script forloop's in GfycatRipper with

            for (String vidurl : findStringsOf(videos.html(), "\"contentUrl\":\"", "\"")) {
                result.add(vidurl);
            }

where getVideoUrl just has return vidurl; instead

maybetrash commented 4 years ago

@outnos Thanks for the reply. Is there a program I need to open the ripper in order to be able to edit the files? Which files would I edit? I have very limited coding/programming experience.