fixes for search dvms

This commit is contained in:
Believethehype 2024-02-12 11:01:50 +01:00
parent fa4576d0b2
commit b61da7187d
2 changed files with 3 additions and 5 deletions

View File

@ -53,9 +53,7 @@ class AdvancedSearch(DVMTaskInterface):
search = ""
max_results = 100
relay = "wss://relay.nostr.band"
if self.options.get("relay") and self.options.get("relay") != "":
relay = self.options['relay']
for tag in event.tags():
if tag.as_vec()[0] == 'i':
input_type = tag.as_vec()[2]

View File

@ -103,9 +103,9 @@ class AdvancedSearchWine(DVMTaskInterface):
userkeys.append(userkey)
print("Sending job to Server")
print("Sending job to nostr.wine API")
if options["users"]:
url = ('https://api.nostr.wine/search?query=' + options["search"] + '&kind=1' + '&pubkey=' + options["users"][0] + "&limit=100" + "&sort=time" + "&until=" + str(options["until"]) + "&since=" + str(options["since"]))
url = ('https://api.nostr.wine/search?query=' + options["search"] + '&kind=1' + '&pubkey=' + options["users"][0][1] + "&limit=100" + "&sort=time" + "&until=" + str(options["until"]) + "&since=" + str(options["since"]))
else:
url = ('https://api.nostr.wine/search?query=' + options["search"] + '&kind=1' + "&limit=100" + "&sort=time" + "&until=" + str(options["until"]) + "&since=" + str(options["since"]))