29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
import regex as re
|
|
|
|
from parsers.generic import GenericParser
|
|
from parsers.generic.parsers import CheckParser
|
|
from parsers.generic.watfag import StreamingService
|
|
|
|
checks = {
|
|
re.compile(r"ATVP"): StreamingService.ATVP,
|
|
re.compile(r"NF"): StreamingService.NFLX,
|
|
re.compile(r"AMZN"): StreamingService.AMZN,
|
|
re.compile(r"DSNP"): StreamingService.DSNP,
|
|
re.compile(r"HMAX|MAX"): StreamingService.HMAX,
|
|
re.compile(r"HULU"): StreamingService.HULU,
|
|
re.compile(r"PCOK"): StreamingService.PCOK,
|
|
re.compile(r"PMTP|PTV"): StreamingService.PMTP,
|
|
re.compile(r"ROKU"): StreamingService.ROKU,
|
|
re.compile(r"TUBI"): StreamingService.TUBI,
|
|
re.compile(r"MGM[\+P]"): StreamingService.MGMP,
|
|
re.compile(r"iT"): StreamingService.ITUN,
|
|
re.compile(r"MA"): StreamingService.MOAN
|
|
}
|
|
|
|
class StreamingParser(CheckParser, GenericParser):
|
|
def __init__(self, release):
|
|
super().__init__(release)
|
|
self.checks = checks
|
|
self.remove_checks = [] # No remove checks for streaming service
|
|
self.attribute_name = "streaming"
|