/showkokhon-scraper-api

Scraps movie schedules from Star Cineplex and Blockbuster Cinemas websites.

Primary LanguageJavaMIT LicenseMIT

showkokhon-scraper-api

Build Status CodeFactor Build Status

Scraps movie schedules from Star Cineplex and Blockbuster Cinemas websites.

Running locally

  • Clone the repo.
  • cd into the dir and run :
mvn clean package
  • Run the war :
java -jar target/showkokhon-scraper-2.1.0.RELEASE.war
  • The server will be up on port 8080. Use the client of your choice to make HTTP requests.

API

GET /

{
    "STATUS_CODE": 200,
    "DATA": null,
    "MSG": "Showkokhon-Scraper-API",
    "SENT_AT": "2019-09-26T12:31:28.881Z"
}

GET /scraper/v1/

Shows basic info.

{
    "STATUS_CODE": 200,
    "DATA": null,
    "MSG": "Green All across the board!",
    "SENT_AT": "2019-08-01T21:01:31.786Z"
}

GET /scraper/v1/schedule/all

Runs the scraper and returns movie schedules from both websites. In case the scraper fails, the server will return a null value as reponse.

Example null response:

{
    "STATUS_CODE": 200,
    "SENT_AT": "2019-08-01T21:01:31.786Z",
    "movies": null
}

Example response: Partial response shown

{
    "STATUS_CODE": 200,
    "SENT_AT": "2019-08-01T21:01:31.786Z",
    "movies": [
        {
            "name": "Aabar Boshonto(2D)",
            "schedule": [
                {
                    "date": "Sunday, June 16, 2019",
                    "playingAt": [
                        {
                            "name": "Bashundhara Shopping Mall, Panthapath",
                            "showTimes": {
                                "showTimes": [
                                    "01:40 PM"
                                ]
                            }
                        }
                    ]
                },
                .......
}

GET /scraper/v1/schedule/

Parameters:

  • cinemaId : 0 for Star Cineplex and 1 for Blockbuster Cinemas

Example request :

http://localhost:8080/scraper/v1/schedule/?cinemaId=0

GET /scraper/v1/schedule/

Parameters

  • cinemaId
  • location : for multiple branches.

Example request :

http://localhost:8080/scraper/v1/schedule/individual/?cinemaId=0&location=bcity

LICENSE

MIT