RipMeApp / ripme

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

Hangs on video JSON object #1317

Open tphillip913 opened 5 years ago

tphillip913 commented 5 years ago

Expected Behavior

Continue after reporting the error

Actual Behavior

Presents the following error, and then hangs until manually terminated:

[!] Error while ripping URL https://www.reddit.com/r/rule34/new/ org.json.JSONException: JSONObject["video"] not found. at org.json.JSONObject.get(JSONObject.java:473) at org.json.JSONObject.getJSONObject(JSONObject.java:573) at com.rarchives.ripme.ripper.rippers.GfycatRipper.getVideoURL(GfycatRipper.java:151) at com.rarchives.ripme.utils.RipUtils.getFilesFromURL(RipUtils.java:70) at com.rarchives.ripme.ripper.rippers.RedditRipper.handleURL(RedditRipper.java:260) at com.rarchives.ripme.ripper.rippers.RedditRipper.parseJsonChild(RedditRipper.java:193) at com.rarchives.ripme.ripper.rippers.RedditRipper.getAndParseAndReturnNext(RedditRipper.java:98) at com.rarchives.ripme.ripper.rippers.RedditRipper.rip(RedditRipper.java:73) at com.rarchives.ripme.App.rip(App.java:99) at com.rarchives.ripme.App.ripURL(App.java:265) at com.rarchives.ripme.App.handleArguments(App.java:248) at com.rarchives.ripme.App.main(App.java:74)

RCcola1987 commented 5 years ago

I'm having the same issue on Windows 7 64bit

Lofwyrian commented 5 years ago

Update: in the current version (1.7.85) it looks as follows (reproduced by ripping /r/rule34)

Throws an error and aborts rip of subreddit. (Link obviously NSFW, because rule34...)

2019-07-09 19:07:20,116 DEBUG utils.RipUtils .getFilesFromURL() Checking https://gfycat.com/amp/disloyalelderlyanaconda-aloy14-gif?__twitter_impression=true 2019-07-09 19:07:20,117 DEBUG utils.RipUtils .getFilesFromURL() Fetching gfycat page https://gfycat.com/amp/disloyalelderlyanaconda-aloy14-gif?__twitter_impression=true 2019-07-09 19:07:20,119 INFO ripper.AbstractRipper .getVideoURL() Retrieving https://gfycat.com/amp/disloyalelderlyanaconda-aloy14-gif?__twitter_impression=true 2019-07-09 19:07:20,286 ERROR ripper.AbstractRipper .run() Got exception while running ripper: org.json.JSONException: JSONObject["video"] not found. at org.json.JSONObject.get(JSONObject.java:473) at org.json.JSONObject.getJSONObject(JSONObject.java:573) at com.rarchives.ripme.ripper.rippers.GfycatRipper.getVideoURL(GfycatRipper.java:151) at com.rarchives.ripme.utils.RipUtils.getFilesFromURL(RipUtils.java:70) at com.rarchives.ripme.ripper.rippers.RedditRipper.handleURL(RedditRipper.java:260) at com.rarchives.ripme.ripper.rippers.RedditRipper.parseJsonChild(RedditRipper.java:193) at com.rarchives.ripme.ripper.rippers.RedditRipper.getAndParseAndReturnNext(RedditRipper.java:98) at com.rarchives.ripme.ripper.rippers.RedditRipper.rip(RedditRipper.java:73) at com.rarchives.ripme.ripper.AbstractRipper.run(AbstractRipper.java:616) at java.lang.Thread.run(Unknown Source) 2019-07-09 19:07:20,286 DEBUG ripper.AbstractRipper .waitForThreads() Waiting for threads to finish 2019-07-09 19:07:20,288 INFO ripper.AbstractRipper .checkIfComplete() Rip completed! 2019-07-09 19:07:20,290 DEBUG ripper.AbstractRipper .checkIfComplete() Changing log file back to 'ripme.log'

tarchive commented 5 years ago

Version 1.7.85 Ripping "https://www.reddit.com/r/GirlsTakingRequest/" results the same as the original post. Immediate error, does not rip a single post.

However i have found a word around.

Instead rip "https://www.reddit.com/r/GirlsTakingRequest/new/" and no more error.

The only thing different i can see between these pages is a sticky surveyhero.com post at the top of the erroring page.

Not sure. Someone more familiar will have to advise

pakiec22 commented 1 year ago

I experience the same issue, I think it fails the https://www.reddit.com/user/flaming-penis/ and adding the /new/ not helping dont crawl anything at all

XargonWan commented 1 year ago

Same issue here, is it possible to workaround this by skipping the file until a proer fix is found?

org.json.JSONException: JSONObject["video"] not found.
        at org.json.JSONObject.get(JSONObject.java:573)
        at org.json.JSONObject.getJSONObject(JSONObject.java:766)
        at com.rarchives.ripme.ripper.rippers.RedgifsRipper.getVideoURL(RedgifsRipper.java:195)
        at com.rarchives.ripme.utils.RipUtils.getFilesFromURL(RipUtils.java:83)
        at com.rarchives.ripme.ripper.rippers.RedditRipper.handleURL(RedditRipper.java:270)
        at com.rarchives.ripme.ripper.rippers.RedditRipper.parseJsonChild(RedditRipper.java:203)
        at com.rarchives.ripme.ripper.rippers.RedditRipper.getAndParseAndReturnNext(RedditRipper.java:106)
        at com.rarchives.ripme.ripper.rippers.RedditRipper.rip(RedditRipper.java:81)
        at com.rarchives.ripme.App.rip(App.java:103)
        at com.rarchives.ripme.App.ripURL(App.java:296)
        at com.rarchives.ripme.App.handleArguments(App.java:265)
        at com.rarchives.ripme.App.main(App.java:78)
user20112 commented 1 year ago

This seems to be an issue with both the redgifs, and gyfcat rippers, while its not the best solution, could we get a pr just expanding the catch statements in RipUtils.java with the following for those two rippers : catch (JSONException e){ logger.warn("Exception while retrieving the video for the redgifs page:",e); } and this catch (JSONException e){ logger.warn("Exception while retrieving the video for the gyfcat page:",e); }

sirus20x6 commented 1 year ago

which line did you add it to?