Code Monkey home page Code Monkey logo

ninegag's Introduction

LuxXx' 9gag API

I implemented a restful serverless 9GAG API with AWS Lambda. It fetches a post and all corresponding information by its id. It's currently hosted in Frankfurt. If you need a mirror somewhere else, message me ([email protected]).

API

The API contains the following functions

  • [GET /:id]

Resource URL

https://ninegag.tdbr.de/:id

Sample Response

This is a sample response:

{
  "statusCode": 200,
  "success": true,
  "body": {
    "imageLink": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_700b.jpg",
    "webmLink": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_460svwm.webm",
    "mp4Link": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_460sv.mp4",
    "gifLink": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_460sa.gif",
    "id": "aWmZAPZ",
    "title": "Where she's travelling?",
    "animated": true,
    "nextId": "azXzKjp",
    "nsfw": 0,
    "upVoteCount": 7762,
    "commentsCount": 788
  }
}

17.05.2017: 9gag switched to HTTPS some time ago, therefore I had to tweak this project a little bit

14.03.2018: 9gag changed the data structure, added nsfw, upVoteCount, and commentsCount

24.07.2018: Changed the type of the body of the response

ninegag's People

Contributors

luxxx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ninegag's Issues

Error: Process exited before completing request

Hi,
I tried your unofficial 9gag API some months ago and it worked just fine for me.
Unfortunately everytime I now try to get some data of an gag ID I get the following JSON Message:
errorMessage | "RequestId: 9f3e9742-d612-4a63-b547-a044239a6b28 Process exited before completing request"

When I just try to GET just the URL without specifying an ID I get the following (normal) response:
success | false message | "You did not specify an id" info | "https://github.com/LuxXx/ninegag"

Maybe 9GAG changed the way they orgranize their posts?

Hopefully you can fix the issue. I'm working on a program which organizes downloaded 9gag content and therefore I tested your API to fetch some data of the posts.

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.