mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
bbee349291
commit
5d1f7212e7
|
@ -624,15 +624,16 @@ def _showLikesOnPost(postJsonObject: {}, maxLikes: int) -> None:
|
||||||
return
|
return
|
||||||
if not postJsonObject['object'].get('likes'):
|
if not postJsonObject['object'].get('likes'):
|
||||||
return
|
return
|
||||||
if not isinstance(postJsonObject['object']['likes'], dict):
|
objectLikes = postJsonObject['object']['likes']
|
||||||
|
if not isinstance(objectLikes, dict):
|
||||||
return
|
return
|
||||||
if not postJsonObject['object']['likes'].get('items'):
|
if not objectLikes.get('items'):
|
||||||
return
|
return
|
||||||
if not isinstance(postJsonObject['object']['likes']['items'], list):
|
if not isinstance(objectLikes['items'], list):
|
||||||
return
|
return
|
||||||
print('')
|
print('')
|
||||||
ctr = 0
|
ctr = 0
|
||||||
for item in postJsonObject['object']['likes']['items']:
|
for item in objectLikes['items']:
|
||||||
print(' ❤ ' + str(item['actor']))
|
print(' ❤ ' + str(item['actor']))
|
||||||
ctr += 1
|
ctr += 1
|
||||||
if ctr >= maxLikes:
|
if ctr >= maxLikes:
|
||||||
|
@ -646,15 +647,16 @@ def _showRepliesOnPost(postJsonObject: {}, maxReplies: int) -> None:
|
||||||
return
|
return
|
||||||
if not postJsonObject['object'].get('replies'):
|
if not postJsonObject['object'].get('replies'):
|
||||||
return
|
return
|
||||||
if not isinstance(postJsonObject['object']['replies'], dict):
|
objectReplies = postJsonObject['object']['replies']
|
||||||
|
if not isinstance(objectReplies, dict):
|
||||||
return
|
return
|
||||||
if not postJsonObject['object']['replies'].get('items'):
|
if not objectReplies.get('items'):
|
||||||
return
|
return
|
||||||
if not isinstance(postJsonObject['object']['replies']['items'], list):
|
if not isinstance(objectReplies['items'], list):
|
||||||
return
|
return
|
||||||
print('')
|
print('')
|
||||||
ctr = 0
|
ctr = 0
|
||||||
for item in postJsonObject['object']['replies']['items']:
|
for item in objectReplies['items']:
|
||||||
print(' ↰ ' + str(item['url']))
|
print(' ↰ ' + str(item['url']))
|
||||||
ctr += 1
|
ctr += 1
|
||||||
if ctr >= maxReplies:
|
if ctr >= maxReplies:
|
||||||
|
|
Loading…
Reference in New Issue