Less indentation

merge-requests/30/head
Bob Mottram 2024-07-15 20:44:46 +01:00
parent ceaaa8aec0
commit 1bc643d34f
1 changed files with 86 additions and 78 deletions

View File

@ -990,8 +990,10 @@ def _xml1str_to_dict(base_dir: str, domain: str, xml_str: str,
unique_string_identifier = title + ' ' + link
pub_date_str = parse_feed_date(pub_date, unique_string_identifier)
if pub_date_str:
if _valid_feed_date(pub_date_str):
if not pub_date_str:
continue
if not _valid_feed_date(pub_date_str):
continue
post_filename = ''
votes_status = []
podcast_properties = \
@ -1146,8 +1148,10 @@ def _atom_feed_to_dict(base_dir: str, domain: str, xml_str: str,
unique_string_identifier = title + ' ' + link
pub_date_str = parse_feed_date(pub_date, unique_string_identifier)
if pub_date_str:
if _valid_feed_date(pub_date_str):
if not pub_date_str:
continue
if not _valid_feed_date(pub_date_str):
continue
post_filename = ''
votes_status = []
podcast_properties = \
@ -1266,8 +1270,10 @@ def _json_feed_v1to_dict(base_dir: str, xml_str: str,
unique_string_identifier = title + ' ' + link
pub_date_str = parse_feed_date(pub_date, unique_string_identifier)
if pub_date_str:
if _valid_feed_date(pub_date_str):
if not pub_date_str:
continue
if not _valid_feed_date(pub_date_str):
continue
post_filename = ''
votes_status = []
fediverse_handle = ''
@ -1368,8 +1374,10 @@ def _atom_feed_yt_to_dict(base_dir: str, xml_str: str,
unique_string_identifier = title + ' ' + link
pub_date_str = parse_feed_date(pub_date, unique_string_identifier)
if pub_date_str:
if _valid_feed_date(pub_date_str):
if not pub_date_str:
continue
if not _valid_feed_date(pub_date_str):
continue
post_filename = ''
votes_status = []
podcast_properties = \