我有以下初始化客户端的函数。
import difflib
from gdata import service, GDataEntry
import atom
import sys
import time
"""Initializing instance and login into www.blogger.com"""
def __init__(self, user, password):
self.blogger_service = service.GDataService(user, password)
self.blogger_service.source = 'gv-cl-blogger-updater-1.0' # Client software name
self.blogger_service.service = 'blogger'
self.blogger_service.account_type = 'GOOGLE'
self.blogger_service.server = 'www.blogger.com'
self.blogger_service.ssl = True # Let's protect connection
print "[I] Logging into " + self.blogger_service.server + " ..."
self.blogger_service.ProgrammaticLogin()
if self.blogger_service.current_token is None:
print "[E] Unable to login into \"" + self.blogger_service.server + "\""
当我运行它时,它会在控制台上显示发送到服务器的代理信息。我有代理用户名和密码,它们也显示在控制台上(在此处删除)
[I] Logging into www.blogger.com ...
!!!!http://netmon.iitb.ac.in:80
!!!!Basic ZGlsYXdhcnM6Xmt1cnVja2NoZXRyYQ==
!!!!http://netmon.iitb.ac.in:80
是否可以设置一个标志以降低调试级别?我试过self.blogger_service.debug=False
了,但它没有改变任何东西。