File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -31,28 +31,28 @@ export const getSeriesTitle = ($seriesPage: SeriesPage): string => {
3131 return $seriesPage ( "h2.heading" ) . text ( ) . trim ( ) ;
3232} ;
3333
34- export const getSeriesAuthors = (
34+ export const getSeriesCreators = (
3535 $seriesPage : SeriesPage
36- ) : Series [ "authors " ] => {
37- const authorLinks = $seriesPage ( "dl.series a[rel=author]" ) ;
38- const authors : Author [ ] = [ ] ;
36+ ) : Series [ "creators " ] => {
37+ const creatorLinks = $seriesPage ( "dl.meta a[rel=author]" ) ;
38+ const creators : Author [ ] = [ ] ;
3939
4040 if (
41- $seriesPage ( "dl.series dd:nth-of-type(1)" ) . text ( ) . trim ( ) === "Anonymous"
41+ $seriesPage ( "dl.meta > dd:nth-of-type(1)" ) . text ( ) . trim ( ) === "Anonymous"
4242 ) {
4343 return "Anonymous" ;
4444 }
4545
46- if ( authorLinks . length !== 0 ) {
47- authorLinks . each ( ( i , element ) => {
46+ if ( creatorLinks . length !== 0 ) {
47+ creatorLinks . each ( ( i , element ) => {
4848 const url = element . attribs . href ;
4949 const [ , username , pseud ] = url . match ( / u s e r s \/ ( .+ ) \/ p s e u d s \/ ( .+ ) / ) ! ;
5050
51- authors . push ( { username : username , pseud : decodeURI ( pseud ) } ) ;
51+ creators . push ( { username : username , pseud : decodeURI ( pseud ) } ) ;
5252 } ) ;
5353 }
5454
55- return authors ;
55+ return creators ;
5656} ;
5757
5858export const getSeriesDescription = (
Original file line number Diff line number Diff line change 11import { loadSeriesPage } from "src/page-loaders" ;
22import { Series } from "types/entities" ;
33import {
4- getSeriesAuthors ,
4+ getSeriesCreators ,
55 getSeriesBookmarkCount ,
66 getSeriesCompletionStatus ,
77 getSeriesDescription ,
@@ -29,7 +29,7 @@ export const getSeries = async ({
2929 name : getSeriesTitle ( seriesPage ) ,
3030 begunAt : getSeriesPublishDate ( seriesPage ) ,
3131 updatedAt : getSeriesUpdateDate ( seriesPage ) ,
32- creators : getSeriesAuthors ( seriesPage ) ,
32+ creators : getSeriesCreators ( seriesPage ) ,
3333 description : getSeriesDescription ( seriesPage ) ,
3434 notes : getSeriesNotes ( seriesPage ) ,
3535 words : getSeriesWordCount ( seriesPage ) ,
You can’t perform that action at this time.
0 commit comments