ripme icon indicating copy to clipboard operation
ripme copied to clipboard

Hangs on video JSON object

Open tphillip913 opened this issue 5 years ago • 7 comments

  • Ripme version: 1.7.83

  • Java version: openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1~deb9u1-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

  • Operating system: PRETTY_NAME="Debian GNU/Linux 9 (stretch)"

  • Exact URL you were trying to rip when the problem occurred: The log does not present the actual Reddit post that presents the error but you can reproduce the error with the URL https://www.reddit.com/r/rule34/new/

  • Please include any additional information about how to reproduce the problem:

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)

tphillip913 avatar May 19 '19 22:05 tphillip913

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

RCcola1987 avatar May 20 '19 14:05 RCcola1987

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'

Lofwyrian avatar Jul 09 '19 17:07 Lofwyrian

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

tarchive avatar Jul 16 '19 23:07 tarchive

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

pakiec22 avatar Dec 30 '22 11:12 pakiec22

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)

XargonWan avatar Jan 26 '23 13:01 XargonWan

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); }

user20112 avatar Mar 24 '23 05:03 user20112

which line did you add it to?

sirus20x6 avatar Sep 07 '23 01:09 sirus20x6