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

Some changes to get test.py working #34

Closed
Charles-Wu-Chen opened this issue Dec 16, 2015 · 2 comments
Closed

Some changes to get test.py working #34

Charles-Wu-Chen opened this issue Dec 16, 2015 · 2 comments

Comments

@Charles-Wu-Chen
Copy link

Hi,
First of all, really appreciate for all the effort to make such a fantastic python crawl for ZhiHu.
But there are some error when I tried to run test.py after cloned.
I made the following to changes to get it to work.

  1. in auth.py,
    def islogin():
    url = "http://www.zhihu.com/settings/profile"
    -- change to
    url = "https://www.zhihu.com/settings/profile"
  2. I think zhihu change some html tag : in zhihu.py
    change from
    soup.find("h3", class_="zm-item-answer-author-wrap")
    to
    soup.find("div", class_="zm-item-answer-author-info")
  3. change class user
    from
    elif user_url[0:28] != "https://www.zhihu.com/people/"
    to
    elif user_url.startswith('www.zhihu.com/people', user_url.index('//')+2) == False

Then everything works fine.

Thanks again for such a brilliant work

Cheers.

@closears
Copy link

@Thinkerinhell 3Q very much! I've been working on this for a few days but I failed:(

@egrcc
Copy link
Owner

egrcc commented Dec 16, 2015

@Thinkerinhell Thanks for your comment!

egrcc added a commit that referenced this issue Dec 16, 2015
@egrcc egrcc closed this as completed Dec 20, 2015
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