diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2021-10-07 09:35:50 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2021-10-07 15:27:55 +0000 |
| commit | 9fb77065bd80e04527c15ea4bdbb1f2ce10eddb8 (patch) | |
| tree | 2e47b4495a531c4b3617c4522e4be18a9ca9187e /searx/engines/torznab.py | |
| parent | d803df8d89c728af5e1fa826301060b221d623e2 (diff) | |
[fix] engine torznab - marginal issues reported from linters
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/torznab.py')
| -rw-r--r-- | searx/engines/torznab.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/searx/engines/torznab.py b/searx/engines/torznab.py index aa9919c34..fed6b1fd1 100644 --- a/searx/engines/torznab.py +++ b/searx/engines/torznab.py @@ -1,4 +1,5 @@ # SPDX-License-Identifier: AGPL-3.0-or-later +# lint: pylint """Torznab WebAPI A engine that implements the `torznab WebAPI`_. @@ -7,9 +8,9 @@ A engine that implements the `torznab WebAPI`_. """ +from datetime import datetime from urllib.parse import quote from lxml import etree -from datetime import datetime from searx.exceptions import SearxEngineAPIException @@ -17,7 +18,7 @@ from searx.exceptions import SearxEngineAPIException about = { "website": None, "wikidata_id": None, - "official_api_documentation": "https://torznab.github.io/spec-1.3-draft/torznab/Specification-v1.3.html#torznab-api-specification", + "official_api_documentation": "https://torznab.github.io/spec-1.3-draft", "use_official_api": True, "require_api_key": False, "results": 'XML', @@ -105,7 +106,7 @@ def response(resp): result["publishedDate"] = datetime.strptime( get_property(item, 'pubDate'), '%a, %d %b %Y %H:%M:%S %z') except (ValueError, TypeError) as e: - pass + logger.debug("ignore exception (publishedDate): %s", e) result["seed"] = get_torznab_attr(item, 'seeders') |