J-Novel Club
    • Categories
    • Recent
    • Tags
    • Users
    • Login

    Developer PSA: labs.j-novel.club is your new friend!

    Scheduled Pinned Locked Moved Suggestions & Feedback
    81 Posts 25 Posters 30.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chocolatkeyC
      chocolatkey Staff
      last edited by

      Added "status" to series, which can be (in JSON format) one of "DEFAULT", "COMPLETE", "HIATUS"

      1 Reply Last reply Reply Quote 2
      • BruhtekB
        Bruhtek Member
        last edited by

        Is it possible to get some pointers on the /parts/$slug/data endpoint? Light novel data is simple enough with /embed/$slug/data.xhtml, but doesn't work for manga. I am trying to get manga parts, but have no idea where to even start decoding the response.

        chocolatkeyC 1 Reply Last reply Reply Quote 1
        • chocolatkeyC
          chocolatkey Staff @Bruhtek
          last edited by

          @Bartek The manga parts currently have DRM due to the stipulations of the original publisher(s). There is, therefore, no documentation on how to decode and display manga data

          BruhtekB 1 Reply Last reply Reply Quote 1
          • BruhtekB
            Bruhtek Member @chocolatkey
            last edited by

            @chocolatkey Ah, too bad!

            1 Reply Last reply Reply Quote 1
            • T
              TailsxKyuubi Premium Member
              last edited by

              My question is regarding the covers. is there any reason, that the field originalUrl is always empty? i would need the cover in a higher resolution.

              chocolatkeyC 1 Reply Last reply Reply Quote 0
              • chocolatkeyC
                chocolatkey Staff @TailsxKyuubi
                last edited by

                @TailsxKyuubi Because we don't actually have any original uploaded right now, it's planned for the future although I think that structure may change before then

                T 1 Reply Last reply Reply Quote 0
                • T
                  TailsxKyuubi Premium Member @chocolatkey
                  last edited by

                  @chocolatkey i dont understand the problem. they are already in some way uploaded. the ebooks itself already have the cover wouldnt it be possible to upload this in a automated process?

                  1 Reply Last reply Reply Quote 0
                  • BruhtekB
                    Bruhtek Member
                    last edited by

                    Does the /auth/otp4app/check not accept format=json query? It works with /auth/otp4app/generate/, but for some reason not with the check one. From a decoder, all I can guess is that it returns some kind of token starting with otp_, and 3 numbers? Could we get some more info on how to login using the OTP code?

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      thelta Member @Bruhtek
                      last edited by thelta

                      @Bartek
                      Yeah, I also couldn't manage to work with json. However, with protoc --decode_raw you can easily parse it. The protobuf format is probably something like this.

                      message Ttl
                      {
                        int64 ttl_seconds = 1;
                      }
                      message AuthSession 
                      {
                        string token = 1;
                        Ttl ttl_seconds = 2;
                        google.protobuf.Timestamp timestamp = 3;
                      }
                      

                      Token size is 56 characters.

                      chocolatkeyC 1 Reply Last reply Reply Quote 0
                      • chocolatkeyC
                        chocolatkey Staff @thelta
                        last edited by

                        @thelta @Bartek this is fixed, please try again

                        1 Reply Last reply Reply Quote 2
                        • redmasqR
                          redmasq Premium Member
                          last edited by redmasq

                          For the heck of it, I decided to start going through the topic here and document the interface.

                          https://github.com/redmasq/jnc_swagger/blob/main/j-novel-club.swagger.yml
                          ...the website https://editor.swagger.io/ can be used to view it. I have setup a viewer on https://redmasq.github.io/jnc_swagger/

                          @chocolatkey if this effort is inappropriate for sharing, let me know and I'll private the repo and just keep it for my own purposes; however, in the meantime, I'm making my work available for others as I go along.

                          Just to note... It is a work-in-progress. So far, I've only done the initial login, but I will be expanding the document as I have time. As a programmer who likes to read isekai, I am hopelessly lazy and prefer studying and reading light novels over actually documenting... the effort is useful to me and I do like to spread the benefit; however, I'm not promising any timelines, update schedule, or anything of the like. I am willing to accept pull requests.

                          1 Reply Last reply Reply Quote 2
                          • BruhtekB
                            Bruhtek Member
                            last edited by Bruhtek

                            @chocolatkey Can I ask You to add https://jnovel.bruhtek.com and (if possible *.jnovel.bruhtek.com) to CORS? I am working on a E-Ink optimized reader, and currently using my own cors proxy, but would prefer to be able to get rid of it as soon as possible (at least for the deployed version).
                            Thanks

                            1 Reply Last reply Reply Quote 1
                            • BruhtekB
                              Bruhtek Member
                              last edited by Bruhtek

                              Also, are there any query parameters for /app/v1/series, except for the format and limit?. I am thinking about a way to only get follows / only catchups (since they're in the app), and if available, maybe also a way to sort the series A-Z, Z-A, release date/update date?

                              Edit:
                              Figured out follows and catchups, for anyone else you have to make a POST request, with body of

                              {
                              	"only_follows": true/false,
                              	"only_catchups": true/false
                              }
                              

                              Still looking for a way to sort the results

                              pcjP 1 Reply Last reply Reply Quote 0
                              • pcjP
                                pcj Premium Member @Bruhtek
                                last edited by

                                @Bruhtek said in Developer PSA: labs.j-novel.club is your new friend!:

                                Still looking for a way to sort the results

                                sorting is easy to do client side.

                                BruhtekB 1 Reply Last reply Reply Quote 0
                                • BruhtekB
                                  Bruhtek Member @pcj
                                  last edited by

                                  @pcj Then I would have to get all the series before sorting them, it is technically viable, but a way to get them already sorted to keep requests small (using pagination) would be even better

                                  pcjP 1 Reply Last reply Reply Quote 0
                                  • pcjP
                                    pcj Premium Member @Bruhtek
                                    last edited by

                                    @Bruhtek True that. I didn't think about pagination, but if that's involved you definitely want a server side sort.

                                    1 Reply Last reply Reply Quote 0
                                    • chocolatkeyC
                                      chocolatkey Staff
                                      last edited by chocolatkey

                                      @Bruhtek Added jnovel.bruhtek.com to the CORS exceptions, definitely nicer than proxying user data through your CORS proxy (please don't). It also includes localhost, 127.0.0.1 and dev.j-novel.club (nonexistent host you can map yourself) if you want to develop locally.

                                      I thought I had documented sorting before, but here's the whole proto message for series querying:

                                      /**
                                       * Search query for series
                                       */
                                      message SeriesQuery {
                                          string query = 1; // Search query
                                          Series.Type type = 2; // The type of series to include
                                      
                                          Sorting sort = 3; // How to sort the series
                                          enum Sorting {
                                              NEWEST = 0; // Sort by created, descending
                                              OLDEST = 1; // Sort by created, ascending
                                              AZ = 2; // Sort by title, ascending
                                              ZA = 3; // Sort by title, descending
                                          }
                                      
                                          bool only_follows = 4;
                                          bool only_catchups = 5;
                                      }
                                      
                                      1 Reply Last reply Reply Quote 3
                                      • X
                                        xellon
                                        last edited by

                                        Hello, I'd like https://xellon.github.io to be included in CORS list. I'm making a pre-pub reader at https://xellon.github.io/pages/j-novel for my kindle paperwhite which has a very basic browser.

                                        1 Reply Last reply Reply Quote 1
                                        • redmasqR
                                          redmasq Premium Member
                                          last edited by

                                          Hello,
                                          Just in case it is needed. I wrote a script that snags all of my purchases very quick (epub). It's just a low-quality quickie, just in case it comes in handy, I've posted it here. No guarantees and such.

                                          https://github.com/redmasq/jnc_swagger/tree/main/examples

                                          I'm probably going to schedule it as a weekly job myself, so as to capture any errata and such. I'll suggest not to use the -forceAll unless necessary since it does cause it to download everything again, which could be hard on J-Novel Club's servers (I'm sure my testing was annoying).

                                          I was having problems with an earlier version of FBReader. I found that repackaging the epub file fixes the issue. The script does this, but it is off by default since the files downloaded works perfectly fine in Calibre and such, and in the latest FBReader (probably was a zip handling issue).

                                          I done it in Powershell since I run Windows for my main desktop, but if bash (Linux), zsh (OSX), or python (whatever) is needed, it's a simple exercise to convert it. For the shell script versions, I need web request and JSON support, so I would probably use something like jq and curl, but they are installed easily through pacman, yum, apt, or brew.

                                          Happy Reading.

                                          1 Reply Last reply Reply Quote 1
                                          • sorvaniS sorvani referenced this topic on
                                          • chocolatkeyC
                                            chocolatkey Staff
                                            last edited by chocolatkey

                                            I'll update this post with the v2 changes after the migration is fully complete. In the meantime, here's a bonus about the new image CDN:

                                            https://cdn.j-novel.club/pub/img/{height}/{format}/{path...}
                                            
                                            height:	120,240,360,480,600,720,840,960,1080,1200
                                            format:	webp,avif,jpg
                                            Full example URL: https://cdn.j-novel.club/pub/img/240/webp/01J/9/V/J9BYFSR8F77KXWT87AZR7.jpg
                                            

                                            Many of the images behind this CDN (e.g. covers) are currently low-resolution, so the bigger heights won't result in any change. The images will eventually be replaced by high-quality equivalents.

                                            T 1 Reply Last reply Reply Quote 6
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 3 / 5
                                            • First post
                                              Last post