Parser
NZBParser
Initialize the NZBParser.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nzb |
str
|
NZB content as a string. |
required |
encoding |
str
|
Encoding of the NZB content. |
'utf-8'
|
Source code in src/nzb/_core.py
from_file
classmethod
Create an NZBParser instance from an NZB file path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nzb |
StrPath
|
File path to the NZB. |
required |
encoding |
str
|
Encoding of the NZB, defaults to |
'utf-8'
|
Returns:
Type | Description |
---|---|
NZBParser
|
An NZBParser instance initialized with the content of the specified NZB file. |
Source code in src/nzb/_core.py
parse
parse() -> NZB
Parse the NZB.
Returns:
Type | Description |
---|---|
NZB
|
NZB object representing the parsed NZB file. |
Raises:
Type | Description |
---|---|
InvalidNZBError
|
Raised if the input is not valid NZB. |