Browse Source

#8 いいねから自分を除外

main
みてるぞ 5 days ago
parent
commit
5041b91485
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      main.py

+ 2
- 1
main.py View File

@@ -333,7 +333,8 @@ def get_target_posts (


timeline: Response = client.get_timeline () timeline: Response = client.get_timeline ()
for feed in timeline.feed: for feed in timeline.feed:
if any (target_word in feed.post.record.text.lower () for target_word in TARGET_WORDS):
if (feed.post.author.did != client.me.did
and any (target_word in feed.post.record.text.lower () for target_word in TARGET_WORDS)):
posts.append (LikeParams({ 'uri': feed.post.uri, 'cid': feed.post.cid })) posts.append (LikeParams({ 'uri': feed.post.uri, 'cid': feed.post.cid }))


return posts return posts


Loading…
Cancel
Save