Ykeremy/bitwarden use search instead of url filter (#462)

This commit is contained in:
Kerem Yilmaz
2024-06-12 15:28:45 -07:00
committed by GitHub
parent 5d134d58d9
commit 5f48de28c8
3 changed files with 42 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ import subprocess
from enum import StrEnum
import structlog
import tldextract
from skyvern.exceptions import (
BitwardenListItemsError,
@@ -117,12 +118,14 @@ class BitwardenService:
raise BitwardenUnlockError("Session key is empty.")
# Step 3: Retrieve the items
# Extract the domain from the URL and search for items in Bitwarden with that domain
domain = tldextract.extract(url).domain
list_command = [
"bw",
"list",
"items",
"--url",
url,
"--search",
domain,
"--session",
session_key,
]