Skip to content

Commit

Permalink
Piccoma : api change (#7117)
Browse files Browse the repository at this point in the history
* Piccoma : api change

Fixes #7113

* Update Piccoma.mjs

* piccomafr : fix clipboard
  • Loading branch information
MikeZeDev authored Jun 1, 2024
1 parent 346eb4f commit 4d4a856
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/web/mjs/connectors/Piccoma.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ export default class Piccoma extends Connector {
try {
const pdata = window.__NEXT_DATA__ ? __NEXT_DATA__.props.pageProps.initialState.viewer.pData : window._pdata_; //PiccomaFR VS JP
if (!pdata) reject();
if (!pdata.img) reject();
const images = pdata.img
const images = (pdata.img ?? pdata.contents)
.filter(img => !!img.path)
.map(img => {
return {
Expand Down
4 changes: 2 additions & 2 deletions src/web/mjs/connectors/PiccomaFR.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class PiccomaFR extends Piccoma {
}

async _getMangaFromURI(uri) {
const id = uri.split('/').pop();
const id = uri.href.split('/').pop();
const request = new Request(`${this.url}/product/${id}`, this.requestOptions);
const [ element ] = await this.fetchDOM(request, 'meta[property="og:title"]');
return new Manga(this, id, element.content.split('|').shift().trim());
Expand Down Expand Up @@ -66,4 +66,4 @@ export default class PiccomaFR extends Piccoma {
});
}

}
}

0 comments on commit 4d4a856

Please sign in to comment.