TruyenChon: remove unwanted text in tittle. (#8669)
* remove unwanted text in title * Update TruyenChon.kt
This commit is contained in:
		
							parent
							
								
									4024c64285
								
							
						
					
					
						commit
						334bbe892d
					
				@ -4,10 +4,13 @@ import eu.kanade.tachiyomi.multisrc.wpcomics.WPComics
 | 
			
		||||
import eu.kanade.tachiyomi.network.GET
 | 
			
		||||
import eu.kanade.tachiyomi.source.model.FilterList
 | 
			
		||||
import eu.kanade.tachiyomi.source.model.Page
 | 
			
		||||
import eu.kanade.tachiyomi.source.model.SManga
 | 
			
		||||
import okhttp3.Request
 | 
			
		||||
import okhttp3.Headers
 | 
			
		||||
import java.text.SimpleDateFormat
 | 
			
		||||
import java.util.Locale
 | 
			
		||||
import org.jsoup.nodes.Document
 | 
			
		||||
import org.jsoup.nodes.Element
 | 
			
		||||
 | 
			
		||||
class TruyenChon : WPComics("TruyenChon", "http://truyenchon.com", "vi", SimpleDateFormat("dd/MM/yy", Locale.getDefault()), null) {
 | 
			
		||||
    override val searchPath = "the-loai"
 | 
			
		||||
@ -19,4 +22,20 @@ class TruyenChon : WPComics("TruyenChon", "http://truyenchon.com", "vi", SimpleD
 | 
			
		||||
            GenreFilter(getGenreList())
 | 
			
		||||
        )
 | 
			
		||||
    }
 | 
			
		||||
    override fun popularMangaFromElement(element: Element): SManga {
 | 
			
		||||
        return SManga.create().apply {
 | 
			
		||||
            element.select("h3 a").let {
 | 
			
		||||
                title = it.text().replace("Truyện tranh ","")
 | 
			
		||||
                setUrlWithoutDomain(it.attr("abs:href"))
 | 
			
		||||
            }
 | 
			
		||||
            thumbnail_url = imageOrNull(element.select("div.image:first-of-type img").first())
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    override fun searchMangaFromElement(element: Element): SManga {
 | 
			
		||||
        return SManga.create().apply {
 | 
			
		||||
            title = element.attr("title").replace("Truyện tranh ","")
 | 
			
		||||
            setUrlWithoutDomain(element.attr("href"))
 | 
			
		||||
            thumbnail_url = imageOrNull(element.select("img").first())
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ class WPComicsGenerator : ThemeSourceGenerator {
 | 
			
		||||
            MultiLang("MangaToro", "https://mangatoro.com", listOf("en", "ja")),
 | 
			
		||||
            SingleLang("NetTruyen", "http://www.nettruyenvip.com", "vi", overrideVersionCode = 4),
 | 
			
		||||
            SingleLang("NhatTruyen", "http://nhattruyenhay.com", "vi", overrideVersionCode = 4),
 | 
			
		||||
            SingleLang("TruyenChon", "http://truyenchon.com", "vi", overrideVersionCode = 2),
 | 
			
		||||
            SingleLang("TruyenChon", "http://truyenchon.com", "vi", overrideVersionCode = 3),
 | 
			
		||||
            SingleLang("XOXO Comics", "https://xoxocomics.com", "en", className = "XoxoComics", overrideVersionCode = 1),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user