missionpanel 1.1.0__tar.gz → 1.1.2__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.0 → missionpanel-1.1.2}/PKG-INFO +1 -1
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/example/ttrss.py +7 -1
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel.egg-info/PKG-INFO +1 -1
- {missionpanel-1.1.0 → missionpanel-1.1.2}/setup.py +1 -1
- {missionpanel-1.1.0 → missionpanel-1.1.2}/LICENSE +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/README.md +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/__init__.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/example/__init__.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/example/rsshub.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/handler/__init__.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/handler/handler.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/orm/__init__.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/orm/core.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/orm/handler.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/submitter/__init__.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/submitter/abc.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/submitter/asynchronous.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel/submitter/submitter.py +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel.egg-info/SOURCES.txt +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel.egg-info/dependency_links.txt +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel.egg-info/requires.txt +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/missionpanel.egg-info/top_level.txt +0 -0
- {missionpanel-1.1.0 → missionpanel-1.1.2}/setup.cfg +0 -0
@@ -2,7 +2,7 @@ import abc
|
|
2
2
|
import asyncio
|
3
3
|
import json
|
4
4
|
import logging
|
5
|
-
from typing import Any, AsyncGenerator, Dict, List
|
5
|
+
from typing import Any, AsyncGenerator, Dict, List, Union
|
6
6
|
import httpx
|
7
7
|
from xml.etree import ElementTree
|
8
8
|
from missionpanel.submitter import AsyncSubmitter
|
@@ -110,7 +110,13 @@ class TTRSSHubSubmitter(TTRSSSubmitter):
|
|
110
110
|
async def parse_xml(self, xml: str) -> AsyncGenerator[Any, None]:
|
111
111
|
pass
|
112
112
|
|
113
|
+
async def preprocess(self, feed: dict, content: dict) -> Union[Dict, None]:
|
114
|
+
return feed
|
115
|
+
|
113
116
|
async def parse_content_nocatch(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[Any, None]:
|
117
|
+
feed = await self.preprocess(feed, content)
|
118
|
+
if feed is None:
|
119
|
+
return
|
114
120
|
async with httpx.AsyncClient(**httpx_client_options) as client:
|
115
121
|
response = await client.get(feed['feed_url'])
|
116
122
|
async for mission_content in self.parse_xml(response.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
|
File without changes
|