missionpanel 1.1.3__tar.gz → 1.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {missionpanel-1.1.3 → missionpanel-1.1.4}/PKG-INFO +1 -1
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/example/rsshub.py +3 -3
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/example/ttrss.py +6 -6
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel.egg-info/PKG-INFO +1 -1
- {missionpanel-1.1.3 → missionpanel-1.1.4}/setup.py +1 -1
- {missionpanel-1.1.3 → missionpanel-1.1.4}/LICENSE +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/README.md +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/__init__.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/example/__init__.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/handler/__init__.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/handler/handler.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/orm/__init__.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/orm/core.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/orm/handler.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/submitter/__init__.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/submitter/abc.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/submitter/asynchronous.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel/submitter/submitter.py +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel.egg-info/SOURCES.txt +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel.egg-info/dependency_links.txt +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel.egg-info/requires.txt +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/missionpanel.egg-info/top_level.txt +0 -0
- {missionpanel-1.1.3 → missionpanel-1.1.4}/setup.cfg +0 -0
@@ -8,7 +8,7 @@ from missionpanel.submitter import AsyncSubmitter
|
|
8
8
|
class RSSHubSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
|
9
9
|
|
10
10
|
@abc.abstractmethod
|
11
|
-
async def parse_xml(self, xml: str) -> AsyncGenerator[
|
11
|
+
async def parse_xml(self, xml: str) -> AsyncGenerator[dict, Any]:
|
12
12
|
pass
|
13
13
|
|
14
14
|
async def derive_tags(self, mission_content) -> List[str]:
|
@@ -30,7 +30,7 @@ class RSSHubSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
|
|
30
30
|
|
31
31
|
class RSSHubRootSubmitter(RSSHubSubmitter):
|
32
32
|
|
33
|
-
async def parse_xml(self, xml: str) -> AsyncGenerator[
|
33
|
+
async def parse_xml(self, xml: str) -> AsyncGenerator[dict, Any]:
|
34
34
|
root = ElementTree.XML(xml)
|
35
35
|
yield {
|
36
36
|
'url': root.find('channel/link').text,
|
@@ -40,7 +40,7 @@ class RSSHubRootSubmitter(RSSHubSubmitter):
|
|
40
40
|
|
41
41
|
class RSSHubSubitemSubmitter(RSSHubSubmitter):
|
42
42
|
|
43
|
-
async def parse_xml(self, xml: str) -> AsyncGenerator[
|
43
|
+
async def parse_xml(self, xml: str) -> AsyncGenerator[dict, Any]:
|
44
44
|
root = ElementTree.XML(xml)
|
45
45
|
for item in root.find('channel').iter('item'):
|
46
46
|
yield {'url': item.find('link').text}
|
@@ -71,7 +71,7 @@ class TTRSSClient(httpx.AsyncClient):
|
|
71
71
|
class TTRSSSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
|
72
72
|
|
73
73
|
@abc.abstractmethod
|
74
|
-
async def parse_content(self, feed: dict, content: dict) -> AsyncGenerator[
|
74
|
+
async def parse_content(self, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
|
75
75
|
pass
|
76
76
|
|
77
77
|
async def derive_tags(self, mission_content) -> List[str]:
|
@@ -107,13 +107,13 @@ class TTRSSHubSubmitter(TTRSSSubmitter):
|
|
107
107
|
logger = logging.getLogger("TTRSSHubSubmitter")
|
108
108
|
|
109
109
|
@abc.abstractmethod
|
110
|
-
async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[
|
110
|
+
async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
|
111
111
|
pass
|
112
112
|
|
113
113
|
async def preprocess(self, feed: dict, content: dict) -> Union[Dict, None]:
|
114
114
|
return feed
|
115
115
|
|
116
|
-
async def parse_content_nocatch(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[
|
116
|
+
async def parse_content_nocatch(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[dict, Any]:
|
117
117
|
feed = await self.preprocess(feed, content)
|
118
118
|
if feed is None:
|
119
119
|
return
|
@@ -122,7 +122,7 @@ class TTRSSHubSubmitter(TTRSSSubmitter):
|
|
122
122
|
async for mission_content in self.parse_xml(response.text, feed, content):
|
123
123
|
yield mission_content
|
124
124
|
|
125
|
-
async def parse_content(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[
|
125
|
+
async def parse_content(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[dict, Any]:
|
126
126
|
try:
|
127
127
|
async for mission_content in self.parse_content_nocatch(feed, content, **httpx_client_options):
|
128
128
|
yield mission_content
|
@@ -132,7 +132,7 @@ class TTRSSHubSubmitter(TTRSSSubmitter):
|
|
132
132
|
|
133
133
|
class TTRRSSHubRootSubmitter(TTRSSHubSubmitter):
|
134
134
|
|
135
|
-
async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[
|
135
|
+
async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
|
136
136
|
root = ElementTree.XML(xml)
|
137
137
|
yield {
|
138
138
|
'url': root.find('channel/link').text,
|
@@ -142,7 +142,7 @@ class TTRRSSHubRootSubmitter(TTRSSHubSubmitter):
|
|
142
142
|
|
143
143
|
class TTRRSSHubSubitemSubmitter(TTRSSHubSubmitter):
|
144
144
|
|
145
|
-
async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[
|
145
|
+
async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
|
146
146
|
root = ElementTree.XML(xml)
|
147
147
|
for item in root.find('channel').iter('item'):
|
148
148
|
yield {'url': item.find('link').text}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|