1234567891011121314151617181920212223242526272829303132333435363738394041 |
- """
- @author: luojunhui
- """
- from typing import Dict
- from applications.api import WechatChannelAPI
- from config import gewe_token, gewe_app_id, gewe_base_url
- 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
- """
- channel_api = WechatChannelAPI(
- base_url=gewe_base_url,
- token=gewe_token,
- app_id=gewe_app_id
- )
- result = channel_api.search(
- search_key=search_key,
- search_type=search_type,
- page=page,
- cookie=cookie,
- search_id=search_id,
- offset=offset
- )
- return result
|