import path_setting
from in_common.base_request import BaseRequest
from bs4 import BeautifulSoup


class wiki_request(BaseRequest):
    def __init__(self):
        #百科详情页-项目百科
        self.data = self.api_load(path_setting.WIKI_ITEM_CONFIG)

    #百科详情页-项目百科
    def wiki_item(self, tag_ids, q, start_num, version, device_id):
        self.params['tag_ids'] = tag_ids
        self.params['q'] = q
        self.params['start_num'] = start_num
        self.params['version'] = version
        self.params['device_id'] = device_id

        return self.api_send(self.data['wiki_item'])

if __name__ == '__main__':
    print(type(wiki_request().wiki_item("2059", "水光针", "0", "7.46.0", "97B6764B-2135-4761-9911-701C38CBC272")))
    # soup = BeautifulSoup(hybrid_request().sub_wiki("744.0", "beijing"), 'lxml')  # html.parser是解析器，也可是lxml
    # print(soup.prettify(),'百科详情页-项目聚合百科') #输出soup对象的内容
    # print(soup.title)