From 069fe864d09f1bbae154ca007a87be3a044ed743 Mon Sep 17 00:00:00 2001 From: polyval Date: Wed, 29 Jun 2016 16:47:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DWindows=E4=B8=8B=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E8=A1=8C=E9=A2=9C=E8=89=B2=E5=8F=AF=E8=83=BD=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth.py | 4 ++++ zhihu.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/auth.py b/auth.py index ed51290..9250dd9 100644 --- a/auth.py +++ b/auth.py @@ -8,6 +8,10 @@ # requirements import requests, termcolor +import colorama + + +colorama.init() requests = requests.Session() diff --git a/zhihu.py b/zhihu.py index e00e939..5bee81c 100755 --- a/zhihu.py +++ b/zhihu.py @@ -54,7 +54,7 @@ import re, json, cookielib # requirements -import requests, termcolor, html2text +import requests, termcolor, html2text, colorama try: from bs4 import BeautifulSoup except: @@ -74,6 +74,8 @@ By Luozijun (https://github.com/LuoZijun), 09/09 2015 """ +colorama.init() + requests = requests.Session() requests.cookies = cookielib.LWPCookieJar('cookies') try: