mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
d5f4a4f926
commit
df23bbbc97
|
@ -1220,20 +1220,21 @@ def hashtag_search_json(nickname: str, domain: str, port: int,
|
||||||
if not post_filename:
|
if not post_filename:
|
||||||
continue
|
continue
|
||||||
post_json_object = load_json(post_filename)
|
post_json_object = load_json(post_filename)
|
||||||
if post_json_object:
|
if not post_json_object:
|
||||||
if not has_object_dict(post_json_object):
|
continue
|
||||||
continue
|
if not has_object_dict(post_json_object):
|
||||||
if not is_public_post(post_json_object):
|
continue
|
||||||
continue
|
if not is_public_post(post_json_object):
|
||||||
if not post_json_object['object'].get('id'):
|
continue
|
||||||
continue
|
if not post_json_object['object'].get('id'):
|
||||||
# add to feed
|
continue
|
||||||
page_items += 1
|
# add to feed
|
||||||
if page_items < posts_per_page * (page_number - 1):
|
page_items += 1
|
||||||
continue
|
if page_items < posts_per_page * (page_number - 1):
|
||||||
id_str = remove_id_ending(post_json_object['object']['id'])
|
continue
|
||||||
hashtag_json['orderedItems'].append(id_str)
|
id_str = remove_id_ending(post_json_object['object']['id'])
|
||||||
hashtag_json['totalItems'] += 1
|
hashtag_json['orderedItems'].append(id_str)
|
||||||
|
hashtag_json['totalItems'] += 1
|
||||||
if hashtag_json['totalItems'] >= posts_per_page:
|
if hashtag_json['totalItems'] >= posts_per_page:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue