blob: 6e443ae2e07be6b0565eef63f59fe4cbc641b06a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
from hircine.plugins import transformer
from hircine.scraper.types import Artist, Tag
@transformer
def transform(generator, info):
for item in generator:
# Ignore the "Drama" tag when scraping from mangadex
if info.source == "mangadex":
match item:
case Tag(tag="Drama"):
continue
# convert all Artist names to lowercase
match item:
case Artist(name):
yield Artist(name.lower())
continue
# other items are not modified
yield item
|