Skip to content

Conversation

@echoturing
Copy link

No description provided.

change get piwik from pickle to json
"""
json_path = 'search_engines.json'
moddir = os.path.dirname(__file__)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 package resource,参考下面怎么加载 pickle


if engine_name == 'Google Images' or \
(engine_name == 'Google' and '/imgres' in original_query):
(engine_name == 'Google' and '/imgres' in original_query):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

手动 format, 不要引入其它的 change

with stream(__name__, pickle_path) as picklestream:
_piwik_engines = pickle.load(picklestream)
_piwik_engines = get_piwik_engines_from_json()
# stream = pkg_resources.resource_stream

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove instead of comment out

@timonwong timonwong requested review from IronsDu and RussellLuo and removed request for IronsDu November 3, 2017 06:48
@echoturing echoturing changed the title 配置改为从json获取 增加bzclk.baidu.com引擎 Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants