Skip to content

Commit

Permalink
Add AsuraScansFree
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNetsky committed Dec 18, 2024
1 parent a5346c4 commit 4336810
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/AsuraScansFree/AsuraScansFree.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {
BadgeColor,
ContentRating,
SourceInfo,
SourceIntents
} from '@paperback/types'
import {
BasicAcceptedElems,
CheerioAPI
} from 'cheerio'
import { AnyNode } from 'domhandler'

import {
getExportVersion,
MangaStream
} from '../MangaStream'

const DOMAIN = 'https://asurascansfree.com'

export const AsuraScansFreeInfo: SourceInfo = {
version: getExportVersion('0.0.0'),
name: 'AsuraScansFree',
description: `Extension that pulls manga from ${DOMAIN}`,
author: 'Netsky',
authorWebsite: 'http://github.com/TheNetsky',
icon: 'icon.png',
contentRating: ContentRating.MATURE,
websiteBaseURL: DOMAIN,
intents: SourceIntents.MANGA_CHAPTERS | SourceIntents.HOMEPAGE_SECTIONS | SourceIntents.CLOUDFLARE_BYPASS_REQUIRED | SourceIntents.SETTINGS_UI,
sourceTags: []
}

export class AsuraScansFree extends MangaStream {

baseUrl: string = DOMAIN

override directoryPath = 'serie'

override configureSections() {
this.homescreen_sections['latest_update'].selectorFunc = ($: CheerioAPI) => $('div.bsx', $('h2:contains(Latest Update)')?.parent()?.next())
this.homescreen_sections['latest_update'].subtitleSelectorFunc = ($: CheerioAPI, element: BasicAcceptedElems<AnyNode>) => $('.fivchap', element).first().text().trim()
this.homescreen_sections['new_titles'].selectorFunc = ($: CheerioAPI) => $('li', $('h3:contains(Newest additions)')?.parent()?.next())
}
}
Binary file added src/AsuraScansFree/includes/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4336810

Please sign in to comment.