|
@@ -627,7 +627,7 @@ class SBClient(BaseClient):
|
|
|
|
|
|
def get_keywords(self,**param):
|
|
def get_keywords(self,**param):
|
|
url_path = "/sb/keywords"
|
|
url_path = "/sb/keywords"
|
|
- return self._request(url_path, method="GET",params=param)
|
|
|
|
|
|
+ return self._request(url_path, method="GET", params=param)
|
|
|
|
|
|
def get_keyword(self,keywordid):
|
|
def get_keyword(self,keywordid):
|
|
url_path = f'/sb/keywords/{keywordid}'
|
|
url_path = f'/sb/keywords/{keywordid}'
|
|
@@ -645,6 +645,25 @@ class SBClient(BaseClient):
|
|
param["startIndex"] += 5000
|
|
param["startIndex"] += 5000
|
|
yield info
|
|
yield info
|
|
|
|
|
|
|
|
+ def get_keyword_groupid(self, **param):
|
|
|
|
+ url_path = "/sb/keywords"
|
|
|
|
+ headers = {
|
|
|
|
+ "Accept": "application/vnd.sbkeyword.v3.2+json"
|
|
|
|
+ }
|
|
|
|
+ return self._request(url_path, params=param, headers=headers)
|
|
|
|
+
|
|
|
|
+ def iter_keyword_groupid(self, **param):
|
|
|
|
+ if "startIndex" not in param:
|
|
|
|
+ param["startIndex"] = 0
|
|
|
|
+ param["count"] = 5000
|
|
|
|
+ while True:
|
|
|
|
+ info: list = self.get_keywords(**param)
|
|
|
|
+ # print(info)
|
|
|
|
+ if len(info) == 0:
|
|
|
|
+ break
|
|
|
|
+ param["startIndex"] += 5000
|
|
|
|
+ yield info
|
|
|
|
+
|
|
def get_targets(self, **body):
|
|
def get_targets(self, **body):
|
|
url_path = "/sb/targets/list"
|
|
url_path = "/sb/targets/list"
|
|
return self._request(url_path, method="POST", body=body)
|
|
return self._request(url_path, method="POST", body=body)
|