Skip to content

feat: add lumostories.com parser#2570

Merged
dteviot merged 1 commit intodteviot:ExperimentalTabModefrom
Crn0:feature/LumosStoriesParser
Mar 24, 2026
Merged

feat: add lumostories.com parser#2570
dteviot merged 1 commit intodteviot:ExperimentalTabModefrom
Crn0:feature/LumosStoriesParser

Conversation

@Crn0
Copy link
Contributor

@Crn0 Crn0 commented Mar 23, 2026

Added LumosStoriesParer for https://lumostories.com/

resolves #2267, #2333 and #2373

//https://lumostories.com/en/story/216/chapters/
if (dom.baseURI.endsWith("/chapters/") || dom.baseURI.endsWith("/chapters")) {
let uriArray = dom.baseURI.split("/").filter(Boolean);
let id = uriArray[uriArray.length - 2];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is length - 2 going to work? That assumes there's a trailing '/' when not there, needs to be - 1

Should probably add '/' if not there, then run e.g.

let url = dom.baseURI;
if (!url.endsWith("/") {
    url += "/"
}
 if (dom.baseURI.endsWith("/chapters/"))
...etc
```

Actually, can simplify this and the case of https://lumostories.com/en/story/216/

Whole function can be
````javascript
getBookId(dom) {
    return  dom.baseURI.split("/")[5];
}
```

@dteviot dteviot merged commit d576f19 into dteviot:ExperimentalTabMode Mar 24, 2026
1 check passed
@dteviot
Copy link
Owner

dteviot commented Mar 24, 2026

Accepted. I'll fix getBookId() later today

Thank you for your efforts.

@dteviot
Copy link
Owner

dteviot commented Mar 24, 2026

@Crn0

Fixed: 11f936e

parserFactory.register("api.lumostories.com", () => new LumosStoriesParer());


class LumosStoriesParer extends Parser {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed it right now, but it looks like I misspelled 'Parser' in this. I will do a quick commit to change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add site https://lumostories.com

2 participants