|
|
@ -262,7 +262,7 @@ def get_reddit_comments(id, client, headers)
|
|
|
|
search_results = RedditSubmit.from_json(search_results.body)
|
|
|
|
search_results = RedditSubmit.from_json(search_results.body)
|
|
|
|
|
|
|
|
|
|
|
|
thread = search_results.data.children.sort_by { |child| child.data.score }[-1]
|
|
|
|
thread = search_results.data.children.sort_by { |child| child.data.score }[-1]
|
|
|
|
result = client.get("/r/#{thread.data.subreddit}/comments/#{thread.data.id}?sort=top&depth=3", headers).body
|
|
|
|
result = client.get("/r/#{thread.data.subreddit}/comments/#{thread.data.id}?limit=100&sort=top", headers).body
|
|
|
|
result = JSON.parse(result)
|
|
|
|
result = JSON.parse(result)
|
|
|
|
elsif search_results.status_code == 302
|
|
|
|
elsif search_results.status_code == 302
|
|
|
|
search_results = client.get(search_results.headers["Location"], headers).body
|
|
|
|
search_results = client.get(search_results.headers["Location"], headers).body
|
|
|
|