Initial commit
This commit is contained in:
28
src/watfag/parsers/generic/streaming.py
Normal file
28
src/watfag/parsers/generic/streaming.py
Normal file
@@ -0,0 +1,28 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user