package Ġeu . kan ade . t ach iy omi . extension . all . m ang ab ox Ċ Ċ import Ġeu . kan ade . t ach iy omi . network . GET Ċ import Ġeu . kan ade . t ach iy omi . network . POST Ċ import Ġeu . kan ade . t ach iy omi . source . Source Ċ import Ġeu . kan ade . t ach iy omi . source . Source Factory Ċ import Ġeu . kan ade . t ach iy omi . source . model . Filter List Ċ import Ġeu . kan ade . t ach iy omi . source . model . M ang as Page Ċ import Ġeu . kan ade . t ach iy omi . source . model . S Chapter Ċ import Ġeu . kan ade . t ach iy omi . source . model . SM anga Ċ import Ġeu . kan ade . t ach iy omi . util . as J soup Ċ import Ġokhttp 3 . Request Ċ import Ġokhttp 3 . RequestBody Ċ import Ġokhttp 3 . Response Ċ import Ġorg . js oup . nodes . Element Ċ import Ġjava . text . SimpleDateFormat Ċ import Ġjava . util . Locale Ċ Ċ class ĠM anga Box Factory Ġ: ĠSource Factory Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġcreate Sources (): ĠList < Source > Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠ ĠM ang ak ak al ot (), ĊĠĠĠĠĠĠĠ ĠM ang ane lo (), ĊĠĠĠĠĠĠĠ ĠM ang af ree (), ĊĠĠĠĠĠĠĠ ĠM ang ab at (), ĊĠĠĠĠĠĠĠ ĠK ono B ash o (), ĊĠĠĠĠĠĠĠ ĠM anga On l () ĊĠĠĠĠĠĠĠ Ġ// Chapter M anga () ĊĠĠĠ Ġ) Ċ } Ċ Ċ // TODO : ĠAltern ate Ġsearch / filters Ġfor Ġsome Ġsources Ġthat Ġdon 't Ġuse Ġquery Ġparameters Ċ Ċ class ĠM ang ak ak al ot Ġ: ĠM anga Box (" M ang ak ak al ot ", Ġ" https :// m ang ak ak al ot . com ", Ġ" en ") Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Selector () Ġ= Ġ"${ super . search M anga Selector ()}, Ġdiv . list - tr uy en - item - wrap " Ċ } Ċ Ċ class ĠM ang ane lo Ġ: ĠM anga Box (" M ang ane lo ", Ġ" https :// m ang ane lo . com ", Ġ" en ") Ġ{ ĊĠĠĠ Ġ// ĠNe lo 's Ġdate Ġformat Ġis Ġpart Ġof Ġthe Ġbase Ġclass ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Request ( page : ĠInt ): ĠRequest Ġ= ĠGET ("$ baseUrl / genre - all /$ page ? type = top view ", Ġheaders ) ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Selector () Ġ= Ġ" div . content - genres - item " ĊĠĠĠ Ġoverride Ġval Ġlatest Url Path Ġ= Ġ" genre - all /" ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Selector () Ġ= Ġ" div . search - story - item , Ġdiv . content - genres - item " ĊĠĠĠ Ġoverride Ġfun Ġget Filter List () Ġ= ĠFilter List () Ċ } Ċ Ċ class ĠM ang af ree Ġ: ĠM anga Box (" M ang af ree ", Ġ" http :// m ang af ree . online ", Ġ" en ") Ġ{ ĊĠĠĠ Ġoverride Ġval Ġpopular Url Path Ġ= Ġ" hot manga /" ĊĠĠĠ Ġoverride Ġval Ġlatest Url Path Ġ= Ġ" latest /" ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Parse ( response : ĠResponse ): ĠM ang as Page Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġresponse . as J soup (). let Ġ{ Ġdocument Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġm ang as Ġ= Ġdocument . select ( popular M anga Selector ()). map Ġ{ Ġpopular M anga From Element ( it ) Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġhas Next Page Ġ= Ġdocument . select (" script : contains Data ( set pagination ) "). last (). data () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. substring After (" set Pagination (" ). substring Before (" ) "). split ("," ). let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit [ 0 ] Ġ!= Ġit [ 1 ] ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ ĠM ang as Page ( m ang as , Ġhas Next Page ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġoverride Ġfun Ġlatest Updates Parse ( response : ĠResponse ): ĠM ang as Page Ġ= Ġpopular M anga Parse ( response ) ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Parse ( response : ĠResponse ): ĠM ang as Page Ġ= Ġpopular M anga Parse ( response ) ĊĠĠĠ Ġoverride Ġfun Ġchapter List Selector () Ġ= Ġ" div # Content Place Holder Left _ list _ chapter _ com ic Ġdiv . row " ĊĠĠĠ Ġoverride Ġfun Ġget Filter List () Ġ= ĠFilter List () Ċ } Ċ Ċ class ĠM ang ab at Ġ: ĠM anga Box (" M ang ab at ", Ġ" https :// m ang ab at . com ", Ġ" en ", ĠSimpleDateFormat (" MMM Ġdd , yy ", ĠLocale . EN GL ISH )) Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Request ( page : ĠInt ): ĠRequest Ġ= ĠGET ("$ baseUrl / manga - list - all /$ page ? type = top view ", Ġheaders ) ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Selector () Ġ= Ġ" div . list - story - item " ĊĠĠĠ Ġoverride Ġval Ġlatest Url Path Ġ= Ġ" manga - list - all /" ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Selector () Ġ= Ġ" div . list - story - item " Ċ } Ċ Ċ class ĠK ono B ash o Ġ: ĠM anga Box (" K ono - B ash o ", Ġ" https :// k ono - bash o . com ", Ġ" en ", ĠSimpleDateFormat (" MMM Ġdd , yy ", ĠLocale . EN GL ISH )) Ġ{ ĊĠĠĠ Ġ// ĠBasic ally Ġa Ġdu pe Ġof ĠM ang ane lo ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Request ( page : ĠInt ): ĠRequest Ġ= ĠGET ("$ baseUrl / genre - all /$ page ? type = top view ", Ġheaders ) ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Selector () Ġ= Ġ" div . content - genres - item " ĊĠĠĠ Ġoverride Ġval Ġlatest Url Path Ġ= Ġ" genre - all /" ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Selector () Ġ= Ġ" div . search - story - item " ĊĠĠĠ Ġoverride Ġfun Ġget Filter List () Ġ= ĠFilter List () Ċ } Ċ Ċ class ĠM anga On l Ġ: ĠM anga Box (" M anga On l ", Ġ" https :// manga on l . com ", Ġ" en ") Ġ{ ĊĠĠĠ Ġoverride Ġval Ġpopular Url Path Ġ= Ġ" story - list - ty - top view - st - all - ca - all -" ĊĠĠĠ Ġoverride Ġval Ġlatest Url Path Ġ= Ġ" story - list - ty - latest - st - all - ca - all -" ĊĠĠĠ Ġoverride Ġfun Ġpopular M anga Selector () Ġ= Ġ" div . story _ item " ĊĠĠĠ Ġoverride Ġval Ġm anga Details Main Selector Ġ= Ġ" div . panel _ story _ info , Ġ${ super . manga Details Main Selector }" Ġ// Some Ġm anga Ġlink Ġto ĠNe lo ĊĠĠĠ Ġoverride Ġval Ġthumbnail Selector Ġ= Ġ" img . story _ avatar , Ġ${ super . thumbnail Selector }" ĊĠĠĠ Ġoverride Ġval Ġdescription Selector Ġ= Ġ" div . panel _ story _ info _ description , Ġ${ super . description Selector }" ĊĠĠĠ Ġoverride Ġfun Ġchapter List Selector () Ġ= Ġ" div . chapter _ list _ title Ġ+ Ġul Ġli , Ġ${ super . chapter List Selector () }" ĊĠĠĠ Ġoverride Ġval Ġpage List Selector Ġ= Ġ" div . container _ read chapter Ġimg , Ġ${ super . page List Selector }" ĊĠĠĠ Ġoverride Ġfun Ġget Filter List () Ġ= ĠFilter List () Ċ } Ċ Ċ class ĠChapter M anga Ġ: ĠM anga Box (" Chapter M anga ", Ġ" https :// chapter manga . com ", Ġ" en ", ĠSimpleDateFormat (" dd - MM - yyyy ", ĠLocale . EN GL ISH )) Ġ{ ĊĠĠĠ Ġoverride Ġval Ġpopular Url Path Ġ= Ġ" hot - manga - page -" ĊĠĠĠ Ġoverride Ġval Ġlatest Url Path Ġ= Ġ" read - latest - manga - page -" ĊĠĠĠ Ġoverride Ġfun Ġchapter List Request ( manga : ĠSM anga ): ĠRequest Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġresponse Ġ= Ġclient . new Call ( GET ( baseUrl Ġ+ Ġm anga . url , Ġheaders )). execute () ĊĠĠĠĠĠĠĠ Ġval Ġcookie Ġ= Ġresponse . headers (" set - cookie ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. filter { Ġit . contains (" laravel _ session ") Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map { Ġit . substring After (" =" ). substring Before ("; ") Ġ} ĊĠĠĠĠĠĠĠ Ġval Ġdocument Ġ= Ġresponse . as J soup () ĊĠĠĠĠĠĠĠ Ġval Ġtoken Ġ= Ġdocument . select (" meta [ name =\" csrf - token \"] "). attr (" content ") ĊĠĠĠĠĠĠĠ Ġval Ġscript Ġ= Ġdocument . select (" script : contains Data ( manga _ slug ) "). first () ĊĠĠĠĠĠĠĠ Ġval Ġm anga Slug Ġ= Ġscript . data (). substring After (" manga _ slug Ġ: Ġ\' "). substring Before ("\ '") ĊĠĠĠĠĠĠĠ Ġval Ġm anga Id Ġ= Ġscript . data (). substring After (" manga _ id Ġ: Ġ\' "). substring Before ("\ '") ĊĠĠĠĠĠĠĠ Ġval Ġtoken Headers Ġ= Ġheaders . newBuilder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add (" Content - Type ", Ġ" application / x - www - form - urlencoded ; Ġcharset = UTF - 8 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add (" X - CSRF - Token ", Ġtoken ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add (" Cookie ", Ġcookie . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġval Ġbody Ġ= ĠRequest Body . create ( null , Ġ" manga _ slug =$ manga Slug & manga _ id =$ manga Id ") ĊĊĠĠĠĠĠĠĠ Ġreturn ĠPOST ("$ baseUrl / get - chapter - list ", Ġtoken Headers , Ġbody ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġoverride Ġfun Ġchapter List Selector () Ġ= Ġ" div . row " ĊĠĠĠ Ġoverride Ġfun Ġchapter From Element ( element : ĠElement ): ĠS Chapter Ġ= Ġsuper . chapter From Element ( element ). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġchapter _ number Ġ= ĠRegex (""" [ Cc ] h apter \ s \ d * "" "). find ( name )?. value ?. substring After (" Ġ") ?. toFloat OrNull () Ġ?: Ġ 0 F ĊĠĠĠ Ġ} ĊĠĠĠ Ġ// ĠTODO Ġchapter list parse Ġ-- Ġdefault Ġchapter Ġorder Ġcould Ġbe Ġbetter ĊĠĠĠ Ġoverride Ġfun Ġget Filter List () Ġ= ĠFilter List () ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Request ( page : ĠInt , Ġquery : ĠString , Ġfilters : ĠFilter List ): ĠRequest Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsite Ġ= ĠbaseUrl . substring After ("// ") ĊĠĠĠĠĠĠĠ Ġval Ġsearch Headers Ġ= Ġheaders . newBuilder (). add (" Content - Type ", Ġ" application / x - www - form - urlencoded "). build () ĊĠĠĠĠĠĠĠ Ġval Ġbody Ġ= ĠRequest Body . create ( null , Ġ" q = site % 3 A $ site + in url % 3 A $ site % 2 F read - manga + ${ query . replace (" Ġ", Ġ"+ ") }& b =& kl = us - en ") ĊĊĠĠĠĠĠĠĠ Ġreturn ĠPOST (" https :// duck duck go . com / html /", Ġsearch Headers , Ġbody ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Parse ( response : ĠResponse ): ĠM ang as Page Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġm ang as Ġ= Ġresponse . as J soup (). select ( search M anga Selector ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. filter { Ġit . text (). startsWith (" Read ") Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map { Ġsearch M anga From Element ( it ) Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠM ang as Page ( m ang as , Ġfalse ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga Selector () Ġ= Ġ" div . result Ġh 2 Ġa " ĊĠĠĠ Ġoverride Ġfun Ġsearch M anga From Element ( element : ĠElement ): ĠSM anga Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠSM anga . create (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Ġ= Ġelement . text (). substring After (" Read "). substring Before Last (" online "). trim () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Url Without Domain ( element . attr (" href ")) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } ĊĊ