From b61da7187d360d0cce0f162112c0209b0c9bfc61 Mon Sep 17 00:00:00 2001 From: Believethehype Date: Mon, 12 Feb 2024 11:01:50 +0100 Subject: [PATCH] fixes for search dvms --- nostr_dvm/tasks/advanced_search.py | 4 +--- nostr_dvm/tasks/advanced_search_wine.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/nostr_dvm/tasks/advanced_search.py b/nostr_dvm/tasks/advanced_search.py index e080c10..eadc4fe 100644 --- a/nostr_dvm/tasks/advanced_search.py +++ b/nostr_dvm/tasks/advanced_search.py @@ -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] diff --git a/nostr_dvm/tasks/advanced_search_wine.py b/nostr_dvm/tasks/advanced_search_wine.py index 0badde8..00ab5c7 100644 --- a/nostr_dvm/tasks/advanced_search_wine.py +++ b/nostr_dvm/tasks/advanced_search_wine.py @@ -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"]))