Skip to content

Commit

Permalink
FIX kakaopage : fix getChapters (#6266)
Browse files Browse the repository at this point in the history
changed graphql request
  • Loading branch information
MikeZeDev authored Oct 3, 2023
1 parent 626c78a commit 0fe944f
Showing 1 changed file with 57 additions and 50 deletions.
107 changes: 57 additions & 50 deletions src/web/mjs/connectors/kakaopage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default class kakaopage extends Connector {
}

async _getChaptersFromPage(manga, nextCursor) {

const gql = {
operationName: 'contentHomeProductList',
variables: {
Expand All @@ -58,56 +59,62 @@ export default class kakaopage extends Connector {
sortType : 'asc',
after : nextCursor,
},
query: `query contentHomeProductList($after: String, $before: String, $first: Int, $last: Int, $seriesId: Long!, $boughtOnly: Boolean, $sortType: String) {
contentHomeProductList(
seriesId: $seriesId
after: $after
before: $before
first: $first
last: $last
boughtOnly: $boughtOnly
sortType: $sortType
) {
totalCount
pageInfo {
hasNextPage
endCursor
hasPreviousPage
startCursor
__typename
}
edges {
cursor
node {
...SingleListViewItem
__typename
}
__typename
}
__typename
}
}
fragment SingleListViewItem on SingleListViewItem {
id
type
thumbnail
isCheckMode
isChecked
scheme
single {
productId
ageGrade
id
isFree
thumbnail
title
slideType
__typename
}
isViewed
purchaseInfoText
}
query: `query contentHomeProductList(
$after: String
$before: String
$first: Int
$last: Int
$seriesId: Long!
$boughtOnly: Boolean
$sortType: String
) {
contentHomeProductList(
seriesId: $seriesId
after: $after
before: $before
first: $first
last: $last
boughtOnly: $boughtOnly
sortType: $sortType
) {
totalCount
pageInfo {
hasNextPage
endCursor
hasPreviousPage
startCursor
}
selectedSortOption {
id
name
param
}
sortOptionList {
id
name
param
}
edges {
cursor
node {
...SingleListViewItem
}
}
}
}
fragment SingleListViewItem on SingleListViewItem {
id
type
single {
productId
id
isFree
thumbnail
title
slideType
}
}
`
};
return await this.fetchGraphQL(this.url+'/graphql', gql.operationName, gql.query, gql.variables );
Expand Down

0 comments on commit 0fe944f

Please sign in to comment.