Example #1
0
 def getArticle(self):
     dict = self.getStoryAndMp3UrlAndTitle()
     story_list = dict['story']
     mp3_list = dict['mp3']
     title_list = dict['title']
     for index in range(0, len(story_list)):
         url = story_list[index]
         patstory = PatStoryMethod()
         sc = patstory.getStorySC(url)
         content_dict = patstory.getContent(sc)
         if content_dict != {}:
             title = title_list[index]
             print 1, title
             date = patstory.getDate(sc)
             print 2, date
             mp3_dict = patstory.getMP3AndTime(mp3_list[index], index, 'Titanic')
             print 3, mp3_dict['mp3_time']
             print 4, mp3_dict['mp3_path']
             pic = 'http://pic.kekenet.com/2013/0203/5551359887061.jpg'
             pic_path = patstory.getPicture(sc, index, 'Titanic', pic)
             print 5, pic_path
             for i in range(0, len(content_dict['en'])):
                 print 6, content_dict['en'][i]
                 if i < len(content_dict['zg']):
                     print 7, content_dict['zg'][i]
             print '\n'
Example #2
0
 def getArticle(self):
     dict = self.getStoryAndMp3UrlAndTitle()
     story_list = dict['story']
     mp3_list = dict['mp3']
     title_list = dict['title']
     for index in range(0, len(story_list)):
         url = story_list[index]
         patstory = PatStoryMethod()
         sc = patstory.getStorySC(url)
         content_dict = patstory.getContent(sc)
         if content_dict != {}:
             title = title_list[index]
             print 1, title
             date = patstory.getDate(sc)
             print 2, date
             mp3_dict = patstory.getMP3AndTime(mp3_list[index], index, 'MaritimePianist')
             print 3, mp3_dict['mp3_time']
             print 4, mp3_dict['mp3_path']
             pic = "http://pic.kekenet.com/2012/0223/20120223034042496.jpg"
             pic_path = patstory.getPicture(sc, index, 'MaritimePianist', pic)
             print 5, pic_path
             for i in range(0, len(content_dict['en'])):
                 print 6, content_dict['en'][i]
                 print 7, content_dict['zg'][i]
             print '\n'