Giter Club home page Giter Club logo

Comments (8)

Insticthere avatar Insticthere commented on June 12, 2024 1

Thanks for this, really appreciate it

from kuryana.

tbdsux avatar tbdsux commented on June 12, 2024

sample: https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/1xrQlbW3

{
  "slug_query": "list/1xrQlbW3",
  "data": {
    "link": "https://mydramalist.com/list/1xrQlbW3",
    "title": "lol",
    "description": "",
    "list": [
      {
        "title": "Vincenzo",
        "image": "https://i.mydramalist.com/vAnBe_4c.jpg",
        "rank": "1",
        "url": "https://mydramalist.com/61371-vincenzo",
        "slug": "/61371-vincenzo",
        "type": "Korean Drama",
        "year": "2021",
        "episodes": 20,
        "short_summary": ""
      },
      {
        "title": "Hi Bye",
        "image": "https://i.mydramalist.com/YoEXWc.jpg",
        "rank": "2",
        "url": "https://mydramalist.com/23470-hi-bye",
        "slug": "/23470-hi-bye",
        "type": "Korean Movie",
        "year": "2012",
        "episodes": null,
        "short_summary": ""
      },
      {
        "title": "Start-Up",
        "image": "https://i.mydramalist.com/RQLeY_4c.jpg",
        "rank": "3",
        "url": "https://mydramalist.com/51909-sandbox",
        "slug": "/51909-sandbox",
        "type": "Korean Drama",
        "year": "2020",
        "episodes": 16,
        "short_summary": ""
      }
    ]
  },
  "scrape_date": "2023-05-31T14:59:52.653361"
}

from kuryana.

Insticthere avatar Insticthere commented on June 12, 2024

Hey, thanks for replying and making a push
I found out two slight issue tho,
https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/1xrQlbW3 gives,

{
  "error": true,
  "code": 400,
  "description": "An unexpected error occurred."
}

This is because it is a private list This can be fixed easily as we can check for <h1 class="text-lg title m-b">This list is private.</h1> under box-body. eg https://mydramalist.com/list/1xrQlbW3

Another, the app ends up crashing when we are using a user list instead of a drama list. The best way i found out to differentiate them is via comparing them via the div <div class="list-bars p-y-sm m-b text-black-lt"> the showlist has a <i class="far fa-tv m-r-xs"></i> While the actors has a <i class="far fa-user m-r-xs"></i> inside the div.

I also just remembered lists which are invalid for exampel https://mydramalist.com/list/dwadwa8da

along with this i was wondering for the future for this repo 🤔 thanks for making this btw!

from kuryana.

tbdsux avatar tbdsux commented on June 12, 2024

This is because it is a private list This can be fixed easily as we can check for <h1 class="text-lg title m-b">This list is private.</h1> under box-body. eg https://mydramalist.com/list/1xrQlbW3

This is currently the intended response, will need to have a workaround to make it work on all endpoints.

Another, the app ends up crashing when we are using a user list instead of a drama list. The best way i found out to differentiate them is via comparing them via the div

the showlist has a While the actors has a inside the div.

I'm sorry, I need more examples for this ...

along with this i was wondering for the future for this repo..

I'm thinking of rather making this a library or moving main scraping functions to a library and make this api extend from it.

from kuryana.

tbdsux avatar tbdsux commented on June 12, 2024
{
  "code": 400,
  "error": true,
  "description": {
    "title": "This list is private.",
    "info": "You can see this page because the URL you are accessing cannot be found."
  }
}

This is currently the best we can have with error messages.

from kuryana.

Insticthere avatar Insticthere commented on June 12, 2024

I'm sorry, I need more examples for this ...

My bad i got my examples messed up, https://mydramalist.com/list/4YWA8y9L this leads to the vercel error page when used on https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/4YWA8y9L

I'm thinking of rather making this a library or moving main scraping functions to a library and make this api extend from it.

Sounds great but please make sure there is a way to use this as a serverless api as i dont use it on python

That is a good error message i dont see a problem, just i dont get that error message right now eg. https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/1xrQlbW3

Not sure if its intended but https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/1312313123 gives 404 which can be used but not sure about the above one

from kuryana.

tbdsux avatar tbdsux commented on June 12, 2024

My bad i got my examples messed up, https://mydramalist.com/list/4YWA8y9L this leads to the vercel error page when used on https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/4YWA8y9L

Will try to work on it later..

https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/1xrQlbW3 this is a preview url, please use the main api url which is:

https://kuryana.vercel.app

Sounds great but please make sure there is a way to use this as a serverless api as i dont use it on python

Of course, but there is still no plan about it.

from kuryana.

tbdsux avatar tbdsux commented on June 12, 2024

My bad i got my examples messed up, https://mydramalist.com/list/4YWA8y9L this leads to the vercel error page when used on https://kuryana-git-implement-lists-api-theboringdude.vercel.app/list/4YWA8y9L

I have added a commit feature for this one.
Examples:

https://kuryana.vercel.app/list/1xrQrzD3
https://kuryana.vercel.app/list/4YWA8y9L

from kuryana.

Related Issues (7)

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.