亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? libgmail.py

?? 一個用Python的gmail功能庫
?? PY
?? 第 1 頁 / 共 4 頁
字號:
            myDataList.append( ('ctf_n', notes) )        validinfokeys = [                        'i', # IM                        'p', # Phone                        'd', # Company                        'a', # ADR                        'e', # Email                        'm', # Mobile                        'b', # Pager                        'f', # Fax                        't', # Title                        'o', # Other                        ]        moreInfo = myContact.getMoreInfo()        ctsn_num = -1        if moreInfo != {}:            for ctsf,ctsf_data in moreInfo.items():                ctsn_num += 1                # data section header, WORK, HOME,...                sectionenum ='ctsn_%02d' % ctsn_num                myDataList.append( ( sectionenum, ctsf ))                ctsf_num = -1                if isinstance(ctsf_data[0],str):                    ctsf_num += 1                    # data section                    subsectionenum = 'ctsf_%02d_%02d_%s' % (ctsn_num, ctsf_num, ctsf_data[0])  # ie. ctsf_00_01_p                    myDataList.append( (subsectionenum, ctsf_data[1]) )                else:                    for info in ctsf_data:                        if validinfokeys.count(info[0]) > 0:                            ctsf_num += 1                            # data section                            subsectionenum = 'ctsf_%02d_%02d_%s' % (ctsn_num, ctsf_num, info[0])  # ie. ctsf_00_01_p                            myDataList.append( (subsectionenum, info[1]) )        myData = urllib.urlencode(myDataList)        request = ClientCookie.Request(myURL,                                       data = myData)        pageData = self._retrievePage(request)        if pageData.find("The contact was successfully added") == -1:            print pageData            if pageData.find("already has the email address") > 0:                raise Exception("Someone with same email already exists in Gmail.")            elif pageData.find("https://www.google.com/accounts/ServiceLogin"):                raise Exception("Login has expired.")            return False        else:            return True    def _removeContactById(self, id):        """        Attempts to remove the contact that occupies        id "id" from the gmail address book.        Returns True if successful,        False otherwise.        This is a little dangerous since you don't really        know who you're deleting. Really,        this should return the name or something of the        person we just killed.        Don't call this method.        You should be using removeContact instead.        """        myURL = _buildURL(search='contacts', ct_id = id, c=id, act='dc', at=self.getCookie(ACTION_TOKEN_COOKIE), view='up')        pageData = self._retrievePage(myURL)        if pageData.find("The contact has been deleted") == -1:            return False        else:            return True    def removeContact(self, gmailContact):        """        Attempts to remove the GmailContact passed in        Returns True if successful, False otherwise.        """        # Let's re-fetch the contact list to make        # sure we're really deleting the guy        # we think we're deleting        newContactList = self.getContacts()        newVersionOfPersonToDelete = newContactList.getContactById(gmailContact.getId())        # Ok, now we need to ensure that gmailContact        # is the same as newVersionOfPersonToDelete        # and then we can go ahead and delete him/her        if (gmailContact == newVersionOfPersonToDelete):            return self._removeContactById(gmailContact.getId())        else:            # We have a cache coherency problem -- someone            # else now occupies this ID slot.            # TODO: Perhaps signal this in some nice way            #       to the end user?                        print "Unable to delete."            print "Has someone else been modifying the contacts list while we have?"            print "Old version of person:",gmailContact            print "New version of person:",newVersionOfPersonToDelete            return False## Don't remove this. contact stas##    def _getSpecInfo(self,id):##        """##        Return all the notes data.##        This is currently not used due to the fact that it requests pages in ##        a dos attack manner.##        """##        myURL =_buildURL(search='contacts',ct_id=id,c=id,\##                        at=self._cookieJar._cookies['GMAIL_AT'],view='ct')##        pageData = self._retrievePage(myURL)##        myData = self._parsePage(myURL)##        #print "\nmyData form _getSpecInfo\n",myData##        rawnotes = myData['cov'][7]##        return rawnotesclass GmailContact:    """    Class for storing a Gmail Contacts list entry    """    def __init__(self, name, email, *extra_args):        """        Returns a new GmailContact object        (you can then call addContact on this to commit         it to the Gmail addressbook, for example)        Consider calling setNotes() and setMoreInfo()        to add extended information to this contact        """        # Support populating other fields if we're trying        # to invoke this the old way, with the old constructor        # whose signature was __init__(self, id, name, email, notes='')        id = -1        notes = ''           if len(extra_args) > 0:            (id, name) = (name, email)            email = extra_args[0]            if len(extra_args) > 1:                notes = extra_args[1]            else:                notes = ''        self.id = id        self.name = name        self.email = email        self.notes = notes        self.moreInfo = {}    def __str__(self):        return "%s %s %s %s" % (self.id, self.name, self.email, self.notes)    def __eq__(self, other):        if not isinstance(other, GmailContact):            return False        return (self.getId() == other.getId()) and \               (self.getName() == other.getName()) and \               (self.getEmail() == other.getEmail()) and \               (self.getNotes() == other.getNotes())    def getId(self):        return self.id    def getName(self):        return self.name    def getEmail(self):        return self.email    def getNotes(self):        return self.notes    def setNotes(self, notes):        """        Sets the notes field for this GmailContact        Note that this does NOT change the note        field on Gmail's end; only adding or removing        contacts modifies them        """        self.notes = notes    def getMoreInfo(self):        return self.moreInfo    def setMoreInfo(self, moreInfo):        """        moreInfo format        ---------------        Use special key values::                        'i' =  IM                        'p' =  Phone                        'd' =  Company                        'a' =  ADR                        'e' =  Email                        'm' =  Mobile                        'b' =  Pager                        'f' =  Fax                        't' =  Title                        'o' =  Other        Simple example::        moreInfo = {'Home': ( ('a','852 W Barry'),                              ('p', '1-773-244-1980'),                              ('i', 'aim:brianray34') ) }        Complex example::        moreInfo = {            'Personal': (('e', 'Home Email'),                         ('f', 'Home Fax')),            'Work': (('d', 'Sample Company'),                     ('t', 'Job Title'),                     ('o', 'Department: Department1'),                     ('o', 'Department: Department2'),                     ('p', 'Work Phone'),                     ('m', 'Mobile Phone'),                     ('f', 'Work Fax'),                     ('b', 'Pager')) }        """        self.moreInfo = moreInfo     def getVCard(self):        """Returns a vCard 3.0 for this        contact, as a string"""        # The \r is is to comply with the RFC2425 section 5.8.1        vcard = "BEGIN:VCARD\r\n"        vcard += "VERSION:3.0\r\n"        ## Deal with multiline notes        ##vcard += "NOTE:%s\n" % self.getNotes().replace("\n","\\n")        vcard += "NOTE:%s\r\n" % self.getNotes()        # Fake-out N by splitting up whatever we get out of getName        # This might not always do 'the right thing'        # but it's a *reasonable* compromise        fullname = self.getName().split()        fullname.reverse()        vcard += "N:%s" % ';'.join(fullname) + "\r\n"        vcard += "FN:%s\r\n" % self.getName()        vcard += "EMAIL;TYPE=INTERNET:%s\r\n" % self.getEmail()        vcard += "END:VCARD\r\n\r\n"        # Final newline in case we want to put more than one in a file        return vcardclass GmailContactList:    """    Class for storing an entire Gmail contacts list    and retrieving contacts by Id, Email address, and name    """    def __init__(self, contactList):        self.contactList = contactList    def __str__(self):        return '\n'.join([str(item) for item in self.contactList])    def getCount(self):        """        Returns number of contacts        """        return len(self.contactList)    def getAllContacts(self):        """        Returns an array of all the        GmailContacts        """        return self.contactList    def getContactByName(self, name):        """        Gets the first contact in the        address book whose name is 'name'.        Returns False if no contact        could be found        """        nameList = self.getContactListByName(name)        if len(nameList) > 0:            return nameList[0]        else:            return False    def getContactByEmail(self, email):        """        Gets the first contact in the        address book whose name is 'email'.        As of this writing, Gmail insists        upon a unique email; i.e. two contacts        cannot share an email address.        Returns False if no contact        could be found        """        emailList = self.getContactListByEmail(email)        if len(emailList) > 0:            return emailList[0]        else:            return False    def getContactById(self, myId):        """        Gets the first contact in the        address book whose id is 'myId'.        REMEMBER: ID IS A STRING        Returns False if no contact        could be found        """        idList = self.getContactListById(myId)        if len(idList) > 0:            return idList[0]        else:            return False    def getContactListByName(self, name):        """        This function returns a LIST        of GmailContacts whose name is        'name'.         Returns an empty list if no contacts        were found        """        nameList = []        for entry in self.contactList:            if entry.getName() == name:                nameList.append(entry)        return nameList    def getContactListByEmail(self, email):        """        This function returns a LIST        of GmailContacts whose email is        'email'. As of this writing, two contacts        cannot share an email address, so this        should only return just one item.        But it doesn't hurt to be prepared?        Returns an empty list if no contacts        were found        """        emailList = []        for entry in self.contactList:            if entry.getEmail() == email:                emailList.append(entry)        return emailList    def getContactListById(self, myId):        """        This function returns a LIST        of GmailContacts whose id is        'myId'. We expect there only to        be one, but just in case!        Remember: ID IS A STRING        Returns an empty list if no contacts        were found        """        idList = []        for entry in self.contactList:            if entry.getId() == myId:                idList.append(entry)        return idList    def search(self, searchTerm):       """       This function returns a LIST       of GmailContacts whose name or       email address matches the 'searchTerm'.       Returns an empty list if no matches       were found.       """       searchResults = []       for entry in self.contactList:           p = re.compile(searchTerm, re.IGNORECASE)           if p.search(entry.getName()) or p.search(entry.getEmail()):               searchResults.append(entry)       return searchResults   class GmailSearchResult:    """    """    def __init__(self, account, search, threadsInfo):        """        `threadsInfo` -- As returned from Gmail but unbunched.        """        #print "\nthreadsInfo\n",threadsInfo        try:            if not type(threadsInfo[0]) is types.ListType:                threadsInfo = [threadsInfo]        except IndexError:            # print "No messages found"            pass                                self._account = account        self.search = search # TODO: Turn into object + format nicely.        self._threads = []                for thread in threadsInfo:            self._threads.append(GmailThread(self, thread[0]))    def __iter__(self):        """        """        return iter(self._threads)    def __len__(self):        """        """        return len(self._threads)    def __getitem__(self,key):        """        """        return self._threads.__getitem__(key)class GmailSessionState:    """    """

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费毛片网站| 五月激情综合网| 欧美一二三在线| av一本久道久久综合久久鬼色| 日本午夜一区二区| 亚洲激情在线播放| 久久久久久久综合| 欧美丰满美乳xxx高潮www| 色综合久久综合网97色综合 | 亚洲va欧美va人人爽| 欧美激情在线免费观看| 日韩一级大片在线| 精品视频999| 欧美性xxxxxx少妇| 成人h版在线观看| 国产精品99久久久久久久vr| 奇米精品一区二区三区四区| 亚洲国产精品嫩草影院| 综合激情成人伊人| 国产精品女上位| 国产午夜精品久久| 久久综合色鬼综合色| 日韩免费视频一区| 欧美一级片免费看| 日韩精品一区二区三区swag| 538在线一区二区精品国产| 国产日韩欧美精品电影三级在线| 911精品国产一区二区在线| 欧美在线观看禁18| 欧亚一区二区三区| 欧美性受极品xxxx喷水| 色综合网站在线| 色综合久久中文综合久久97 | 风间由美性色一区二区三区| 国产又粗又猛又爽又黄91精品| 久久精品国内一区二区三区| 久久97超碰色| 国精产品一区一区三区mba桃花| 美女诱惑一区二区| 精品一区二区三区免费毛片爱| 免费在线观看日韩欧美| 久久99精品久久久久久国产越南| 久久超碰97中文字幕| 激情六月婷婷久久| 国产不卡免费视频| 91视频一区二区| 91国偷自产一区二区使用方法| 91黄色免费版| 欧美一级一级性生活免费录像| 日韩一区二区电影| 国产日韩一级二级三级| 中文字幕日本不卡| 一区二区三区高清不卡| 三级欧美韩日大片在线看| 日本网站在线观看一区二区三区| 免费欧美日韩国产三级电影| 精品一区二区三区在线观看| 顶级嫩模精品视频在线看| 波多野洁衣一区| 欧美在线免费观看视频| 精品久久久三级丝袜| 日本一区二区在线不卡| 一区二区三区精密机械公司| 日韩电影免费一区| 国产一区二区免费视频| 91在线观看地址| 日韩一级成人av| 国产亚洲一区二区在线观看| 亚洲美女免费在线| 免费的成人av| 不卡的电视剧免费网站有什么| 欧美亚洲日本国产| 久久婷婷国产综合国色天香| 亚洲日本一区二区三区| 青青草精品视频| 97精品视频在线观看自产线路二 | 国产精品久久三| 五月天国产精品| 成人aaaa免费全部观看| 欧美日韩大陆一区二区| 国产欧美日韩在线| 日韩在线卡一卡二| 成人动漫一区二区| 日韩免费高清av| 亚洲乱码国产乱码精品精可以看| 麻豆精品在线视频| 色婷婷激情久久| 国产欧美日韩麻豆91| 日韩高清不卡一区| 色综合一区二区三区| 日韩欧美在线一区二区三区| 亚洲人吸女人奶水| 国产一区免费电影| 欧美猛男男办公室激情| 国产精品第四页| 国产在线播放一区三区四| 欧美日韩久久一区| 亚洲欧洲美洲综合色网| 国内精品不卡在线| 欧美老人xxxx18| 一区二区三区在线不卡| 成人动漫精品一区二区| 久久综合色播五月| 老鸭窝一区二区久久精品| 日本精品裸体写真集在线观看| 国产欧美一区二区三区网站| 久久国产生活片100| 欧美专区日韩专区| 亚洲人成人一区二区在线观看| 国产精品一二三四| 精品福利在线导航| 午夜精品福利视频网站 | 日韩一区二区三区电影在线观看 | 国产精品三级在线观看| 狠狠色狠狠色综合日日91app| 91精品国产欧美一区二区 | 99视频超级精品| 国产日韩欧美制服另类| 韩国视频一区二区| 精品久久久久久久久久久院品网| 亚洲大片一区二区三区| 欧美综合亚洲图片综合区| 1区2区3区欧美| 9l国产精品久久久久麻豆| 国产精品欧美一区喷水| 成人一区二区三区视频在线观看| 亚洲精品在线电影| 黄页视频在线91| 欧美精品一区二区三区一线天视频| 水野朝阳av一区二区三区| 欧美女孩性生活视频| 婷婷综合另类小说色区| 欧美一区二区三区在线观看视频 | 国产成人在线视频播放| 久久亚洲综合av| 国产一区 二区 三区一级| 久久在线免费观看| 国产麻豆精品在线观看| 中文天堂在线一区| 色婷婷综合中文久久一本| 亚洲一线二线三线视频| 欧美理论片在线| 久久国产福利国产秒拍| 久久色视频免费观看| 成人动漫在线一区| 亚洲精品成a人| 7777精品伊人久久久大香线蕉| 日韩二区在线观看| 精品国产一区二区三区久久影院| 黄色资源网久久资源365| 国产免费观看久久| 在线视频中文字幕一区二区| 日韩高清一区二区| 2024国产精品| www.日韩大片| 婷婷亚洲久悠悠色悠在线播放| 日韩女优毛片在线| 粉嫩嫩av羞羞动漫久久久| 亚洲三级理论片| 91精品国产日韩91久久久久久| 国产资源精品在线观看| 亚洲色图视频网| 欧美一区二区视频在线观看2022| 极品销魂美女一区二区三区| 亚洲欧洲99久久| 欧美久久高跟鞋激| 国产91精品一区二区| 亚洲国产综合91精品麻豆| 久久一二三国产| 日本韩国欧美一区| 国产一区二区毛片| 一区二区三区四区激情| 日韩免费观看高清完整版| 成人精品国产一区二区4080| 首页亚洲欧美制服丝腿| 国产日韩成人精品| 欧美日韩国产乱码电影| 国产精品一二三区在线| 天堂蜜桃91精品| 亚洲国产经典视频| 91精品国产综合久久久久久久久久| 国产精品99久久久久久宅男| 婷婷久久综合九色国产成人 | 琪琪久久久久日韩精品| 国产欧美日韩麻豆91| 在线播放91灌醉迷j高跟美女 | 日韩欧美一区二区三区在线| 成人高清视频在线观看| 麻豆精品久久久| 一区二区免费看| 中文乱码免费一区二区| 日韩欧美久久久| 欧美日韩精品一二三区| 处破女av一区二区| 精品一区二区三区不卡| 丝袜美腿成人在线| 亚洲欧美一区二区三区孕妇| 国产亚洲一本大道中文在线| 日韩欧美卡一卡二| 欧美日本在线观看|