mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-10-11 11:03:24 +02:00
Update content_discovery_latest_one_per_follower.py
This commit is contained in:
@@ -136,9 +136,14 @@ class Discoverlatestperfollower(DVMTaskInterface):
|
|||||||
|
|
||||||
filters = []
|
filters = []
|
||||||
for i in range(i, i + st):
|
for i in range(i, i + st):
|
||||||
filter1 = (Filter().author(PublicKey.from_hex(users[i])).kind(Kind(1))
|
try:
|
||||||
|
user = PublicKey.parse(users[i])
|
||||||
|
filter1 = (Filter().author(user).kind(Kind(1))
|
||||||
.limit(1))
|
.limit(1))
|
||||||
filters.append(filter1)
|
filters.append(filter1)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
event_from_authors = await cli.get_events_of(filters, relay_timeout_long)
|
event_from_authors = await cli.get_events_of(filters, relay_timeout_long)
|
||||||
for author in event_from_authors:
|
for author in event_from_authors:
|
||||||
if instance.dic[author.author().to_hex()] is None:
|
if instance.dic[author.author().to_hex()] is None:
|
||||||
|
Reference in New Issue
Block a user