missionpanel 1.2.3.1__tar.gz → 1.2.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.
Files changed (23) hide show
  1. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/PKG-INFO +1 -1
  2. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/example/rsshub.py +10 -5
  3. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel.egg-info/PKG-INFO +1 -1
  4. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/setup.py +1 -1
  5. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/LICENSE +0 -0
  6. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/README.md +0 -0
  7. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/__init__.py +0 -0
  8. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/example/__init__.py +0 -0
  9. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/example/ttrss.py +0 -0
  10. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/handler/__init__.py +0 -0
  11. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/handler/handler.py +0 -0
  12. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/orm/__init__.py +0 -0
  13. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/orm/core.py +0 -0
  14. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/orm/handler.py +0 -0
  15. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/submitter/__init__.py +0 -0
  16. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/submitter/abc.py +0 -0
  17. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/submitter/asynchronous.py +0 -0
  18. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel/submitter/submitter.py +0 -0
  19. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel.egg-info/SOURCES.txt +0 -0
  20. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel.egg-info/dependency_links.txt +0 -0
  21. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel.egg-info/requires.txt +0 -0
  22. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/missionpanel.egg-info/top_level.txt +0 -0
  23. {missionpanel-1.2.3.1 → missionpanel-1.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: missionpanel
3
- Version: 1.2.3.1
3
+ Version: 1.2.4
4
4
  Summary: A mission panel
5
5
  Home-page: https://github.com/yindaheng98/missionpanel
6
6
  Author: yindaheng98
@@ -1,11 +1,13 @@
1
1
  import abc
2
2
  from typing import AsyncGenerator, List, Any
3
3
  import httpx
4
+ import logging
4
5
  from xml.etree import ElementTree
5
6
  from missionpanel.submitter import AsyncSubmitter
6
7
 
7
8
 
8
9
  class RSSHubSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
10
+ logger = logging.getLogger("RSSHubSubmitter")
9
11
 
10
12
  @abc.abstractmethod
11
13
  async def parse_xml(self, xml: str) -> AsyncGenerator[dict, Any]:
@@ -21,11 +23,14 @@ class RSSHubSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
21
23
  async with httpx.AsyncClient(**httpx_client_options) as client:
22
24
  response = await client.get(rsshub)
23
25
  async for mission_content in self.parse_xml(response.text):
24
- matchers = await self.derive_matcher(mission_content)
25
- await self.create_mission(mission_content, matchers)
26
- tags = await self.derive_tags(mission_content)
27
- if len(tags) > 0:
28
- await self.add_tags(matchers, tags)
26
+ try:
27
+ matchers = await self.derive_matcher(mission_content)
28
+ await self.create_mission(mission_content, matchers)
29
+ tags = await self.derive_tags(mission_content)
30
+ if len(tags) > 0:
31
+ await self.add_tags(matchers, tags)
32
+ except Exception as e:
33
+ self.logger.warning(f'create mission failed, error: {e}')
29
34
 
30
35
 
31
36
  class RSSHubRootSubmitter(RSSHubSubmitter):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: missionpanel
3
- Version: 1.2.3.1
3
+ Version: 1.2.4
4
4
  Summary: A mission panel
5
5
  Home-page: https://github.com/yindaheng98/missionpanel
6
6
  Author: yindaheng98
@@ -12,7 +12,7 @@ package_dir = {
12
12
 
13
13
  setup(
14
14
  name='missionpanel',
15
- version='1.2.3.1',
15
+ version='1.2.4',
16
16
  author='yindaheng98',
17
17
  author_email='yindaheng98@gmail.com',
18
18
  url='https://github.com/yindaheng98/missionpanel',
File without changes
File without changes
File without changes