Browse Source

#8 すでにいいねしてゐるポストは対象外に

main
みてるぞ 4 days ago
parent
commit
fb920a1f2c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      main.py

+ 1
- 0
main.py View File

@@ -334,6 +334,7 @@ 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 (feed.post.author.did != client.me.did if (feed.post.author.did != client.me.did
and (feed.post.viewer.like is None)
and any (target_word in feed.post.record.text.lower () for target_word in TARGET_WORDS)): 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 }))




Loading…
Cancel
Save