Update danbooru tag category scraper
parent
6cd6bb1745
commit
5253297809
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "neo-scraper",
|
||||
"version": "0.7.4",
|
||||
"version": "0.7.5",
|
||||
"description": "Scrape a booru-like post object from the DOM.",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
|
|
|||
|
|
@ -76,7 +76,9 @@ export default class Danbooru extends ScrapeEngineBase {
|
|||
}
|
||||
|
||||
let category: TagCategory | undefined;
|
||||
switch (tagElement.className) {
|
||||
console.dir(tagElement.classList);
|
||||
for (const className of tagElement.classList) {
|
||||
switch (className) {
|
||||
case "tag-type-3":
|
||||
category = "copyright";
|
||||
break;
|
||||
|
|
@ -90,6 +92,7 @@ export default class Danbooru extends ScrapeEngineBase {
|
|||
category = "meta";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (tagName) {
|
||||
const tag = new ScrapedTag(tagName, category);
|
||||
|
|
|
|||
Loading…
Reference in New Issue