Skip to content
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

调用方法search_gzh_info()搜索公众号时,获取到的结果中wechatid为‘’ #62

Closed
huansoo opened this issue Apr 26, 2017 · 7 comments

Comments

@huansoo
Copy link

huansoo commented Apr 26, 2017

api.py中的方法search_gzh_info()获取到的变量info值为:u'微信号:autohomeweixin',调用方法
info = re.split('微信号:|月发文|篇|平均阅读', info)后,info数组的长度为1,故取wechatid = info[1]时会报错,获取到的所有wechatid都为‘’

@yyNoMoon
Copy link

将获取到的info转换成utf8格式再用info = re.split('微信号:|月发文|篇|平均阅读', info)得到info[1],info[1]里面就是微信号了:
info = info.encode('utf8','ignore')
info = re.split('微信号:|月发文|篇|平均阅读', info)
wechatid = info[1]

@chyroc
Copy link
Owner

chyroc commented Jul 18, 2017

@yyNoMoon 方便提一个pr吗,就是把你的修改放上来

@yyNoMoon
Copy link

search_gzh_info.txt

@yyNoMoon
Copy link

api.py文件里这一个函数里只修改了一点点,萌新不敢改太多。。。 @chyroc

@chyroc
Copy link
Owner

chyroc commented Jul 18, 2017

@yyNoMoon 额,你知道怎么提pr(pull request)吗,步骤如下:

先点击本repo右上角的fork

然后 git clone <fork之后的地址>

然后 git checkout -b <branch-name>切换到新的分支,准备写代码

然后修改代码,保证可以运行,去除测试用的log和print,然后

git add <filename>            //这个filename是将你刚刚改的文件名,如果有多个文件,就运行多次
git commit -m "一些解释"
git push --set-upstream origin <branch-name>       //将本地修改的代码推送到远程(也就是github上)

然后你去你fork之后的地址,点击 创建一个新的 pull request

我就能看到了

@chyroc
Copy link
Owner

chyroc commented Jul 26, 2017

#92

@chyroc
Copy link
Owner

chyroc commented Jul 26, 2017

#70

This was referenced Jul 26, 2017
@chyroc chyroc closed this as completed Jul 26, 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

No branches or pull requests

3 participants