New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
增加bzclk.baidu.com引擎 #18
base: master
Are you sure you want to change the base?
Conversation
serpextract/serpextract.py
Outdated
change get piwik from pickle to json | ||
""" | ||
json_path = 'search_engines.json' | ||
moddir = os.path.dirname(__file__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 package resource,参考下面怎么加载 pickle
serpextract/serpextract.py
Outdated
@@ -384,7 +400,7 @@ def parse(self, url_parts): | |||
engine_name = self.engine_name | |||
|
|||
if engine_name == 'Google Images' or \ | |||
(engine_name == 'Google' and '/imgres' in original_query): | |||
(engine_name == 'Google' and '/imgres' in original_query): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
手动 format, 不要引入其它的 change
serpextract/serpextract.py
Outdated
with stream(__name__, pickle_path) as picklestream: | ||
_piwik_engines = pickle.load(picklestream) | ||
_piwik_engines = get_piwik_engines_from_json() | ||
# stream = pkg_resources.resource_stream |
There was a problem hiding this comment.
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
No description provided.