Skip to content

Instantly share code, notes, and snippets.

@InNoobWeTrust
Last active November 4, 2018 15:45
Show Gist options
  • Save InNoobWeTrust/b3a7a50103e8f2c0f8eab7f63fa62639 to your computer and use it in GitHub Desktop.
Save InNoobWeTrust/b3a7a50103e8f2c0f8eab7f63fa62639 to your computer and use it in GitHub Desktop.
Manga sources config samples
{
"apiVersion": "0.0.1",
"info": {
"name": "Hoc Vien Truyen Tranh",
"short_name": "HVTT",
"icon": "http://hocvientruyentranh.net/frontend/images/favicon.png",
"lang": "Vietnamese",
"origins": [
"http://hocvientruyentranh.net"
],
"headers": {
"user-agent": "Mozilla/5.0 (Windows NT 6.3; WOW64)"
}
},
"entries": [
"manga list",
"search",
"new chapter",
"new manga",
"most viewed",
"most followed",
"top day",
"top week",
"top month"
],
"views": {
"chapter": {
"view": "collage",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"elements": [
{
"id": "collage__picture",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".manga-container>img",
"attribute": "src"
}
}
]
}
]
},
"manga": {
"view": "album",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"elements": [
{
"id": "album__title",
"amount": "single",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": ".__name"
}
}
]
},
{
"id": "album__cover",
"amount": "single",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".__image>img",
"attribute": "src"
}
}
]
},
{
"id": "album__description",
"amount": "single",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": ".__description>p"
}
}
]
},
{
"id": "collage",
"target": "chapter",
"amount": "multiple",
"sort": "desc",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "div.table-scroll>table.table.table-hover>tbody>tr>td>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": "div.table-scroll>table.table.table-hover>tbody>tr>td>a"
}
},
{
"role": "meta",
"name": "Update time",
"instruction": {
"selector": "div.table-scroll>table.table.table-hover>tbody>tr>td:nth-child(2)"
}
},
{
"role": "meta",
"name": "Views",
"instruction": {
"selector": "div.table-scroll>table.table.table-hover>tbody>tr>td:nth-child(3)"
}
}
]
},
{
"name": "Cảnh báo độ tuổi",
"amount": "single",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "div.alert.alert-warning"
}
}
]
},
{
"name": "Tên khác",
"amount": "single",
"parsers": [
{
"role": "primary",
"strategy": "html__delegate",
"instruction": {
"es6": "[...document.querySelectorAll(\"div.__info>p\")].find(e=>e.innerText.includes(\"Tên khác\")).innerText.substring(10)"
}
}
]
},
{
"name": "Thể loại",
"amount": "multiple",
"parsers": [
{
"role": "link",
"strategy": "html__delegate",
"instruction": {
"es6": "JSON.stringify([[...document.querySelectorAll(\"div.__info>p\")].find(e=>e.innerText.includes(\"Thể loại\")).querySelectorAll(\"a\").map(e=>e.href)])JSON.stringify([...[...document.querySelectorAll(\"div.__info>p\")].find(e=>e.innerText.includes(\"Thể loại\")).querySelectorAll(\"a\")].map(e=>e.href))"
}
},
{
"role": "primary",
"strategy": "html__delegate",
"instruction": {
"es6": "JSON.stringify([...[...document.querySelectorAll(\"div.__info>p\")].find(e=>e.innerText.includes(\"Thể loại\")).querySelectorAll(\"a\")].map(e=>e.innerText))"
}
}
]
},
{
"name": "Tình trạng",
"amount": "single",
"parsers": [
{
"role": "primary",
"strategy": "html__delegate",
"instruction": {
"es6": "[...document.querySelectorAll(\"div.__info>p\")].find(e=>e.innerText.includes(\"Tình trạng\")).innerText.substring(12)"
}
}
]
},
{
"name": "Tác giả",
"amount": "multiple",
"parsers": [
{
"role": "link",
"strategy": "html__delegate",
"instruction": {
"es6": "JSON.stringify([...[...document.querySelectorAll(\".__info>p\")].find(e=>e.innerText.includes(\"Tác giả\")).querySelectorAll(\"a\")].map(e=>e.href))"
}
},
{
"role": "primary",
"strategy": "html__delegate",
"instruction": {
"es6": "JSON.stringify([...[...document.querySelectorAll(\".__info>p\")].find(e=>e.innerText.includes(\"Tác giả\")).querySelectorAll(\"a\")].map(e=>e.innerText))"
}
}
]
},
{
"name": "Nhóm dịch",
"amount": "multiple",
"parsers": [
{
"role": "link",
"strategy": "html__delegate",
"instruction": {
"es6": "JSON.stringify([...[...document.querySelectorAll(\".__info>p\")].find(e=>e.innerText.includes(\"Nhóm dịch\")).querySelectorAll(\"a\")].map(e=>e.href))"
}
},
{
"role": "primary",
"strategy": "html__delegate",
"instruction": {
"es6": "JSON.stringify([...[...document.querySelectorAll(\".__info>p\")].find(e=>e.innerText.includes(\"Nhóm dịch\")).querySelectorAll(\"a\")].map(e=>e.innerText))"
}
}
]
}
]
},
"manga list": {
"view": "category",
"path": "/manga/all",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "Manga List"
},
"query_params": [
{
"name": "page",
"input": "number",
"options": [],
"default": [
"1"
]
}
],
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "table.table-hover>tbody>tr>td:nth-child(1)>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": "table.table-hover>tbody>tr>td:nth-child(1)>a",
"attribute": "title"
}
}
]
},
{
"id": "album__cover",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "table.table-hover>tbody>tr>td:nth-child(1)>a",
"attribute": "data-thumbnail"
}
}
]
},
{
"id": "album__description",
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": ".table.table-hover>tbody>tr>td:nth-child(1)>a",
"attribute": "data-description"
}
}
]
},
{
"id": "pagination",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".pagination.no-margin>li>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": ".pagination.no-margin>li>a"
}
}
]
},
{
"id": "prev",
"amount": "single",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".pagination.no-margin>li>a[rel=prev]",
"attribute": "href"
}
}
]
},
{
"id": "next",
"amount": "single",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".pagination.no-margin>li>a[rel=next]",
"attribute": "href"
}
}
]
}
]
},
"new chapter": {
"view": "category",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "New chapter"
},
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "#new-manga-chapter li>div.manga-box>div.__info>h4.__title>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": "#new-manga-chapter li>div.manga-box>div.__info>h4.__title>a"
}
}
]
},
{
"id": "album__description",
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "#new-manga-chapter li>div.manga-box>div.__info"
}
}
]
}
]
},
"new manga": {
"view": "category",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "New manga"
},
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "#new-manga li>div.manga-box>a.__image",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": "#new-manga li>div.manga-box>div.__info>h4.__title>a"
}
}
]
},
{
"id": "album__cover",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "#new-manga li>div.manga-box>a.__image>img",
"attribute": "data-src"
}
}
]
},
{
"id": "album__description",
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "#new-manga li>div.manga-box>div.__info"
}
}
]
}
]
},
"most viewed": {
"view": "category",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "Most viewed"
},
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "#most-view-manga li>div.manga-box>a.__image",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": "#most-view-manga li>div.manga-box>div.__info>h4.__title>a"
}
}
]
},
{
"id": "album__cover",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "#most-view-manga li>div.manga-box>a.__image>img",
"attribute": "data-src"
}
}
]
},
{
"id": "album__description",
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "#most-view-manga li>div.manga-box>div.__info"
}
}
]
}
]
},
"most followed": {
"view": "category",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "Most followed"
},
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "#most-follow-manga li>div.manga-box>a.__image",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": "#most-follow-manga li>div.manga-box>div.__info>h4.__title>a"
}
}
]
},
{
"id": "album__cover",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": "#most-follow-manga li>div.manga-box>a.__image>img",
"attribute": "data-src"
}
}
]
},
{
"id": "album__description",
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "#most-follow-manga li>div.manga-box>div.__info"
}
}
]
}
]
},
"top day": {
"view": "category",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "Top day"
},
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".ctd-tabs.ranking>.tab-content>#top-day>table>tbody>tr>td:nth-child(2)>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": ".ctd-tabs.ranking>.tab-content>#top-day>table>tbody>tr>td:nth-child(2)>a"
}
}
]
}
]
},
"top week": {
"view": "category",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "Top week"
},
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".ctd-tabs.ranking>.tab-content>#top-week>table>tbody>tr>td:nth-child(2)>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": ".ctd-tabs.ranking>.tab-content>#top-week>table>tbody>tr>td:nth-child(2)>a"
}
}
]
}
]
},
"top month": {
"view": "category",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "Top month"
},
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".ctd-tabs.ranking>.tab-content>#top-month>table>tbody>tr>td:nth-child(2)>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": ".ctd-tabs.ranking>.tab-content>#top-month>table>tbody>tr>td:nth-child(2)>a"
}
}
]
}
]
},
"search": {
"view": "category",
"path": "/searchs",
"preload_path": "/searchs",
"default_strategy": "html__css_select",
"default_preprocess_type": "dom",
"info": {
"name": "Search"
},
"query_params": [
{
"name": "keyword",
"display_name": "Từ khoá",
"input": "text"
},
{
"name": "type",
"display_name": "Loại",
"input": "radio",
"preload": {
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "#type > option"
}
},
{
"role": "meta",
"name": "value",
"instruction": {
"selector": "#type > option",
"attribute": "value"
}
}
]
}
},
{
"name": "author",
"display_name": "Tác giả",
"input": "radio",
"preload": {
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "#author > option"
}
},
{
"role": "meta",
"name": "value",
"instruction": {
"selector": "#author > option",
"attribute": "value"
}
}
]
}
},
{
"name": "genres[]",
"display_name": "Thể loại",
"input": "checkbox",
"preload": {
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "div.genre-item label"
}
},
{
"role": "meta",
"name": "value",
"instruction": {
"selector": "div.genre-item input",
"attribute": "value"
}
}
]
}
},
{
"name": "status",
"display_name": "Tình trạng",
"input": "radio",
"preload": {
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"selector": "#status > option"
}
},
{
"role": "meta",
"name": "value",
"instruction": {
"selector": "#status > option",
"attribute": "value"
}
}
]
}
}
],
"elements": [
{
"id": "album",
"target": "manga",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".table.table-hover>tbody>tr>td:nth-child(1)>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": ".table.table-hover>tbody>tr>td:nth-child(1)>a",
"attribute": "title"
}
}
]
},
{
"id": "album__cover",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".table.table-hover>tbody>tr>td:nth-child(1)>a",
"attribute": "data-thumbnail"
}
}
]
},
{
"id": "album_description",
"amount": "multiple",
"parsers": [
{
"role": "primary",
"instruction": {
"attribute": "data-description",
"selector": ".table.table-hover>tbody>tr>td:nth-child(1)>a"
}
}
]
},
{
"id": "pagination",
"amount": "multiple",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".pagination.no-margin>li>a",
"attribute": "href"
}
},
{
"role": "primary",
"instruction": {
"selector": ".pagination.no-margin>li>a"
}
}
]
},
{
"id": "prev",
"amount": "single",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".pagination.no-margin>li>a[rel=prev]",
"attribute": "href"
}
}
]
},
{
"id": "next",
"amount": "single",
"parsers": [
{
"role": "link",
"instruction": {
"selector": ".pagination.no-margin>li>a[rel=next]",
"attribute": "href"
}
}
]
}
]
}
}
}
apiVersion: "0.0.1"
info:
name: Hoc Vien Truyen Tranh
short_name: HVTT
icon: "http://hocvientruyentranh.net/frontend/images/favicon.png"
lang: Vietnamese
origins:
- "http://hocvientruyentranh.net"
headers:
user-agent: Mozilla/5.0 (Windows NT 6.3; WOW64)
entries:
- manga list
- search
- new chapter
- new manga
- most viewed
- most followed
- top day
- top week
- top month
views:
chapter:
view: collage
default_strategy: html__css_select
default_preprocess_type: dom
elements:
- id: collage__picture
amount: multiple
parsers:
- role: link
instruction:
selector: ".manga-container>img"
attribute: src
manga:
view: album
default_strategy: html__css_select
default_preprocess_type: dom
elements:
- id: album__title
amount: single
parsers:
- role: primary
instruction:
selector: ".__name"
- id: album__cover
amount: single
parsers:
- role: link
instruction:
selector: ".__image>img"
attribute: src
- id: album__description
amount: single
parsers:
- role: primary
instruction:
selector: ".__description>p"
- id: collage
target: chapter
amount: multiple
sort: desc
parsers:
- role: link
instruction:
selector: "div.table-scroll>table.table.table-hover>tbody>tr>td>a"
attribute: href
- role: primary
instruction:
selector: "div.table-scroll>table.table.table-hover>tbody>tr>td>a"
- role: meta
name: Update time
instruction:
selector: "div.table-scroll>table.table.table-hover>tbody>tr>td:nth-child(2)"
- role: meta
name: Views
instruction:
selector: "div.table-scroll>table.table.table-hover>tbody>tr>td:nth-child(3)"
- name: Cảnh báo độ tuổi
amount: single
parsers:
- role: primary
instruction:
selector: "div.alert.alert-warning"
- name: Tên khác
amount: single
parsers:
- role: primary
strategy: html__delegate
instruction:
es6: '[...document.querySelectorAll("div.__info>p")].find(e=>e.innerText.includes("Tên khác")).innerText.substring(10)'
- name: Thể loại
amount: multiple
parsers:
- role: link
strategy: html__delegate
instruction:
es6: 'JSON.stringify([[...document.querySelectorAll("div.__info>p")].find(e=>e.innerText.includes("Thể loại")).querySelectorAll("a").map(e=>e.href)])JSON.stringify([...[...document.querySelectorAll("div.__info>p")].find(e=>e.innerText.includes("Thể loại")).querySelectorAll("a")].map(e=>e.href))'
- role: primary
strategy: html__delegate
instruction:
es6: 'JSON.stringify([...[...document.querySelectorAll("div.__info>p")].find(e=>e.innerText.includes("Thể loại")).querySelectorAll("a")].map(e=>e.innerText))'
- name: Tình trạng
amount: single
parsers:
- role: primary
strategy: html__delegate
instruction:
es6: '[...document.querySelectorAll("div.__info>p")].find(e=>e.innerText.includes("Tình trạng")).innerText.substring(12)'
- name: Tác giả
amount: multiple
parsers:
- role: link
strategy: html__delegate
instruction:
es6: 'JSON.stringify([...[...document.querySelectorAll(".__info>p")].find(e=>e.innerText.includes("Tác giả")).querySelectorAll("a")].map(e=>e.href))'
- role: primary
strategy: html__delegate
instruction:
es6: 'JSON.stringify([...[...document.querySelectorAll(".__info>p")].find(e=>e.innerText.includes("Tác giả")).querySelectorAll("a")].map(e=>e.innerText))'
- name: Nhóm dịch
amount: multiple
parsers:
- role: link
strategy: html__delegate
instruction:
es6: 'JSON.stringify([...[...document.querySelectorAll(".__info>p")].find(e=>e.innerText.includes("Nhóm dịch")).querySelectorAll("a")].map(e=>e.href))'
- role: primary
strategy: html__delegate
instruction:
es6: 'JSON.stringify([...[...document.querySelectorAll(".__info>p")].find(e=>e.innerText.includes("Nhóm dịch")).querySelectorAll("a")].map(e=>e.innerText))'
manga list:
view: category
path: /manga/all
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: Manga List
query_params:
- name: page
input: number
options: []
default:
- "1"
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: "table.table-hover>tbody>tr>td:nth-child(1)>a"
attribute: href
- role: primary
instruction:
selector: "table.table-hover>tbody>tr>td:nth-child(1)>a"
attribute: title
- id: album__cover
amount: multiple
parsers:
- role: link
instruction:
selector: "table.table-hover>tbody>tr>td:nth-child(1)>a"
attribute: data-thumbnail
- id: album__description
amount: multiple
parsers:
- role: primary
instruction:
selector: ".table.table-hover>tbody>tr>td:nth-child(1)>a"
attribute: data-description
- id: pagination
amount: multiple
parsers:
- role: link
instruction:
selector: ".pagination.no-margin>li>a"
attribute: href
- role: primary
instruction:
selector: ".pagination.no-margin>li>a"
- id: prev
amount: single
parsers:
- role: link
instruction:
selector: ".pagination.no-margin>li>a[rel=prev]"
attribute: href
- id: next
amount: single
parsers:
- role: link
instruction:
selector: ".pagination.no-margin>li>a[rel=next]"
attribute: href
new chapter:
view: category
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: New chapter
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: "#new-manga-chapter li>div.manga-box>div.__info>h4.__title>a"
attribute: href
- role: primary
instruction:
selector: "#new-manga-chapter li>div.manga-box>div.__info>h4.__title>a"
- id: album__description
amount: multiple
parsers:
- role: primary
instruction:
selector: "#new-manga-chapter li>div.manga-box>div.__info"
new manga:
view: category
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: New manga
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: "#new-manga li>div.manga-box>a.__image"
attribute: href
- role: primary
instruction:
selector: "#new-manga li>div.manga-box>div.__info>h4.__title>a"
- id: album__cover
amount: multiple
parsers:
- role: link
instruction:
selector: "#new-manga li>div.manga-box>a.__image>img"
attribute: data-src
- id: album__description
amount: multiple
parsers:
- role: primary
instruction:
selector: "#new-manga li>div.manga-box>div.__info"
most viewed:
view: category
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: Most viewed
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: "#most-view-manga li>div.manga-box>a.__image"
attribute: href
- role: primary
instruction:
selector: "#most-view-manga li>div.manga-box>div.__info>h4.__title>a"
- id: album__cover
amount: multiple
parsers:
- role: link
instruction:
selector: "#most-view-manga li>div.manga-box>a.__image>img"
attribute: data-src
- id: album__description
amount: multiple
parsers:
- role: primary
instruction:
selector: "#most-view-manga li>div.manga-box>div.__info"
most followed:
view: category
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: Most followed
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: "#most-follow-manga li>div.manga-box>a.__image"
attribute: href
- role: primary
instruction:
selector: "#most-follow-manga li>div.manga-box>div.__info>h4.__title>a"
- id: album__cover
amount: multiple
parsers:
- role: link
instruction:
selector: "#most-follow-manga li>div.manga-box>a.__image>img"
attribute: data-src
- id: album__description
amount: multiple
parsers:
- role: primary
instruction:
selector: "#most-follow-manga li>div.manga-box>div.__info"
top day:
view: category
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: Top day
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: ".ctd-tabs.ranking>.tab-content>#top-day>table>tbody>tr>td:nth-child(2)>a"
attribute: href
- role: primary
instruction:
selector: ".ctd-tabs.ranking>.tab-content>#top-day>table>tbody>tr>td:nth-child(2)>a"
top week:
view: category
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: Top week
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: ".ctd-tabs.ranking>.tab-content>#top-week>table>tbody>tr>td:nth-child(2)>a"
attribute: href
- role: primary
instruction:
selector: ".ctd-tabs.ranking>.tab-content>#top-week>table>tbody>tr>td:nth-child(2)>a"
top month:
view: category
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: Top month
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: ".ctd-tabs.ranking>.tab-content>#top-month>table>tbody>tr>td:nth-child(2)>a"
attribute: href
- role: primary
instruction:
selector: ".ctd-tabs.ranking>.tab-content>#top-month>table>tbody>tr>td:nth-child(2)>a"
search:
view: category
path: /searchs
preload_path: /searchs
default_strategy: html__css_select
default_preprocess_type: dom
info:
name: Search
query_params:
- name: keyword
display_name: Từ khoá
input: text
- name: type
display_name: Loại
input: radio
preload:
amount: multiple
parsers:
- role: primary
instruction:
selector: "#type > option"
- role: meta
name: value
instruction:
selector: "#type > option"
attribute: value
- name: author
display_name: Tác giả
input: radio
preload:
amount: multiple
parsers:
- role: primary
instruction:
selector: "#author > option"
- role: meta
name: value
instruction:
selector: "#author > option"
attribute: value
- name: "genres[]"
display_name: Thể loại
input: checkbox
preload:
amount: multiple
parsers:
- role: primary
instruction:
selector: "div.genre-item label"
- role: meta
name: value
instruction:
selector: "div.genre-item input"
attribute: value
- name: status
display_name: Tình trạng
input: radio
preload:
amount: multiple
parsers:
- role: primary
instruction:
selector: "#status > option"
- role: meta
name: value
instruction:
selector: "#status > option"
attribute: value
elements:
- id: album
target: manga
amount: multiple
parsers:
- role: link
instruction:
selector: ".table.table-hover>tbody>tr>td:nth-child(1)>a"
attribute: href
- role: primary
instruction:
selector: ".table.table-hover>tbody>tr>td:nth-child(1)>a"
attribute: title
- id: album__cover
amount: multiple
parsers:
- role: link
instruction:
selector: ".table.table-hover>tbody>tr>td:nth-child(1)>a"
attribute: data-thumbnail
- id: album_description
amount: multiple
parsers:
- role: primary
instruction:
attribute: data-description
selector: ".table.table-hover>tbody>tr>td:nth-child(1)>a"
- id: pagination
amount: multiple
parsers:
- role: link
instruction:
selector: ".pagination.no-margin>li>a"
attribute: href
- role: primary
instruction:
selector: ".pagination.no-margin>li>a"
- id: prev
amount: single
parsers:
- role: link
instruction:
selector: ".pagination.no-margin>li>a[rel=prev]"
attribute: href
- id: next
amount: single
parsers:
- role: link
instruction:
selector: ".pagination.no-margin>li>a[rel=next]"
attribute: href
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment