I’m usig Zapier to search for a property address using the extended search and return a ZPID however when I search a property that has multiple units or if it’s a condo or townhouse whenever there’s multiple ZPIDs being returned I’m getting an error message in zapier. It works fine when only one ZPID is returned do you know if there’s a way to only grab one or the first ZP ID so it doesn’t return this error:
Error message: Your code had an error! Traceback (most recent call last): File “<string>”, line 27, in the_function TypeError: list indices must be integers or slices, not str
You can try add:
if hasattr(response.json(), 'get') == True and response.json().get("zpid") != None: zpid = response.json()['zpid'] elif hasattr(response.json(), 'get') == False and len(response.json()) > 0: zpid = response.json()[0].get("zpid") output = [{ 'property_address': property_address, 'query_search': query_search, 'zpid': zpid }]
instead of
zpid = response.json()['zpid'] output = [{ 'property_address': property_address, 'query_search': query_search, 'zpid': zpid }]
Hi
I’m usig Zapier to search for a property address using the extended search and return a ZPID however when I search a property that has multiple units or if it’s a condo or townhouse whenever there’s multiple ZPIDs being returned I’m getting an error message in zapier. It works fine when only one ZPID is returned do you know if there’s a way to only grab one or the first ZP ID so it doesn’t return this error:
Error message: Your code had an error! Traceback (most recent call last): File “<string>”, line 27, in the_function TypeError: list indices must be integers or slices, not str
my code:
import requests
string together property address
property_address = input[“street”] + “,” + input[“city”] + “,” + input[“state”] + " " + input[“zip”]
query_search = property_address.replace(" ", “+”)
search url
url = “https://zillow-com1.p.rapidapi.com/propertyExtendedSearch”
querystring = {“location”:query_search}
headers = {
“X-RapidAPI-Key”: “MYKEY”,
“X-RapidAPI-Host”: “zillow-com1.p.rapidapi.com”
}
response = requests.request(“GET”, url, headers=headers, params=querystring)
extract the zpid
zpid = response.json()[‘zpid’]
output = [{ ‘property_address’: property_address, ‘query_search’: query_search, ‘zpid’: zpid }]
Hi!
I can’t see if there is information about the number of followers for a brand on the Poshmark site.
Suggest where it is if you see it.
Hey hi! I was wondering if its possible to find out the first 100 most followed brands on poshmark? thank you)