Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mangadex-api
Advanced tools
This is Mangadex website api wrapper.
npm i mangadex-api
# or
yarn add mangadex-api
// In V5 Mangadex switched id type from number to string.
// So if you need to convert it, call the convertLegacyId method.
// Soon will be added to usual methods, maybe.
Mangadex.convertLegacyId([12], 'group')
.then((result) => {
if (result.result === 'error') {
console.log(
`Got error on convertLegacyId request! ${result.errors
.map((err) => err.title)
.join(', ')}`
)
return
}
const { newId } = result.data.attributes
console.log(`New group id: ${newId}`)
})
Mangadex.manga
.getManga(
'c26269c7-0f5d-4966-8cd5-b79acb86fb7a',
{
// will fetch additionally scanlation_group, artist, author attributes
withRelationShips: true
}
)
.then(({ result, data, errors }) => {
if (result === 'error') {
// oh no! something went wrong!
// here we can handle errors array.
}
const { title, originalLanguage } = data.attributes
console.log(`Manga ${title.en} published in ${originalLanguage}`)
Mangadex.manga
.getMangaFeed('c26269c7-0f5d-4966-8cd5-b79acb86fb7a', {
limit: 10
})
.then(({ results: chapters }) => {
console.log(`Manga ${title.en} has ${chapters.length} chapters`)
const { volume, chapter } = chapters[0].data.attributes
console.log(`Latest chapter: Vol ${volume} Ch ${chapter}`)
})
})
Mangadex.chapter.getChapter(8857).then((chapter) => {
if (chapter.result === 'error') {
console.log(
`Got errors on chapter request! ${chapter.errors
.map((err) => err.title)
.join(', ')}`
)
return
}
console.log(
`Chapter title is "${chapter.data.attributes.title}" and it is ${chapter.data.attributes.chapter} chapter from ${chapter.volume} volume.`
)
})
// currently requires authorization
Mangadex.manga.search({ title: 'senko' }).then(({ total }) => {
console.log(`Found ${total} titles.`)
})
// Search with NSFW results
Mangadex.manga
.search({
title: 'gotoubun',
contentRating: ['pornographic']
})
.then((result) => {
console.log(`Found ${result.results.length} hentai manga (☞ ͡ ͡° ͜ ʖ ͡ ͡°)☞`)
})
Mangadex.group.getGroup(12).then((group) => {
if (group.result === 'error') {
console.log(
`Got errors from group request! ${group.errors
.map((err) => err.title)
.join(', ')}`
)
return
}
const { name, members } = group.data.attributes
console.log(`Group ${name} has ${members} members`)
})
const { Mangadex } = require('mangadex-api')
const client = new Mangadex()
const loginResult = await client.auth.login('username', 'password')
if (loginResult.result === 'error') {
// oh no! it's login error!
}
const result = await client.manga.search('To Be Winner')
console.log(result)
// first you must save your session somewhere
const loginResult = await client.auth.login('username', 'password')
if (loginResult.result === 'error') {
// oh no! it's login error!
}
await client.agent.saveSession('/path/to/session'))
// now we can use it
await client.agent.loginWithSession('/path/to/session')
const me = await client.user.getMe()
console.log(me)
API section is available on the website.
My telegram and a group where you can ask your questions or suggest something.
FAQs
mangadex api wrapper with known apis
The npm package mangadex-api receives a total of 21 weekly downloads. As such, mangadex-api popularity was classified as not popular.
We found that mangadex-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.