""" @author: luojunhui """ import json from typing import List, Dict import requests def search_in_wechat_channel( search_key: str, search_type: int, page: int = 0, cookie: str = "", search_id: str = "", offset: int = 0, ) -> Dict: """ :param search_key: 搜索关键字 :param search_type: 搜索类型,1: 搜索所有视频, 2: 搜索视频号账号 :param page: 页码 :param cookie: 登录后的cookie :param search_id: 搜索id :param offset: 偏移量 :return: result_list """ token = "d3fb918f-0f36-4769-b095-410181614231" app_id = "wx_GKpVW8xfEhcaxMIK9sSm6" url = "http://api.geweapi.com/gewe/v2/api/finder/search" payload = json.dumps( { "appId": app_id, "proxyIp": "", "content": search_key, "category": search_type, "filter": 0, "page": page, "cookie": cookie, "searchId": search_id, "offset": offset, } ) headers = {"X-GEWE-TOKEN": token, "Content-Type": "application/json"} response = requests.request("POST", url, headers=headers, data=payload, timeout=60) response_json = response.json() return response_json