Skip to content

Commit 79bc9e6

Browse files
author
Anonymous Committer
committed
refactor: Update API taobao search_item_list_v6 to include price filter
1 parent 0ff26a2 commit 79bc9e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

justoneapi/apis/taobao.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def get_item_sale_v5(self, item_id: str):
134134
}
135135
return request_util.get_request(url, params)
136136

137-
def search_item_list_v6(self, keyword: str, sort: str, page: int, tab: str = None):
137+
def search_item_list_v6(self, keyword: str, sort: str, page: int, tab: str = None, start_price: str = None, end_price: str = None):
138138
url = f"{config.BASE_URL}/api/taobao/search-item-list/v6"
139139
params = {
140140
"token": self.token,
@@ -144,6 +144,10 @@ def search_item_list_v6(self, keyword: str, sort: str, page: int, tab: str = Non
144144
}
145145
if tab:
146146
params["tab"] = tab
147+
if start_price:
148+
params["startPrice"] = start_price
149+
if end_price:
150+
params["endPrice"] = end_price
147151

148152
has_next_page = False
149153
result, data, message = request_util.get_request_page(url, params)

0 commit comments

Comments
 (0)