Example #1
0
 def getAlbumList(self):
     """
     get post 都有效
     :return:
     """
     http = Http()
     params = {"sitefrom": "cloudalbum_android", "sortType": 0}
     res = http.getUrl("http://photo.163.com/papi/user/替换你的用户名/product/list", self.headers, params)
     res = res.decode('gbk')
     print("========获取到相册列表=========")
     parseXml = ParseXml()
     return parseXml.parseList(res)
Example #2
0
    def __init__(self, filename):
        self.filename_xml = filename + '.xml'
        print self.filename_xml
        self.xml = ParseXml(self.filename_xml)
        self.parameters = Parameters()

        self.dic_t_xml = self.xml.getDicTerms()
        self.dic_nts = self.xml.getDicNTStructure()

        self.dic_an = {}
        #self.dic_sv = {}
        #self.dic_vo = {}

        self.mountANRelations = True
Example #3
0
    def getAlbumDetail(self, albumId):
        """
        get post 都有效
        :return:
        """
        http = Http()
        params = {"sitefrom": "cloudalbum_android"}
        # try:
        res = http.getUrl("http://photo.163.com/papi/user/替换你的用户名/albumid/" + albumId, self.headers, params)
        res = res.decode('gbk')
        # except:
        #     print("albumId:"+albumId)

        print("\n")
        print("1、获取到相册:" + albumId + "=========")
        parseXml = ParseXml()
        return parseXml.parseAlbum(res)