Пример #1
0
 def comment(self):
     cmt = comment.Comment()
     if self.app.pargs.song != None:
         cmt.view_capture(int(self.app.pargs.song), 1)
         return
     if self.app.pargs.count != None:
         cmt.auto_view(int(self.app.pargs.count))
     else:
         cmt.auto_view(1)
Пример #2
0
 def toplist(self):
     msc = music.Music()
     cmt = comment.Comment(comment.Comment.Official)
     for id in uapi.top:
         pylog.print_info('正在抓取官方排行榜 歌单ID:{} 歌单名字:{}'.format(id, uapi.top[id]))
         msc.view_capture(id)
     cnt = int(self.app.pargs.count)
     if cnt <= 0:
         print(Fore.RED + "不合法的--count -c 变量( > 0 )")
     else:
         cmt.auto_view(cnt)
Пример #3
0
 def comment(self):
     cmt = comment.Comment()
     if self.app.pargs.song is not None:
         print(Fore.BLUE + '正在执行抓取歌曲 {} 热门评论计划'.format(self.app.pargs.song))
         cmt.view_capture(int(self.app.pargs.song), 1)
         print(Fore.GREEN + '抓取完成\r\n')
         return
     if self.app.pargs.count is not None:
         print(Fore.GREEN + '正在执行批量抓取热门评论计划,本次计划抓取歌曲 {} 首\r\n'.format(self.app.pargs.count))
         cmt.auto_view(int(self.app.pargs.count))
     else:
         cmt.auto_view(1)
Пример #4
0
def read_comment_data(id):
    cmt = comment.Comment()
    return cmt.post(id,1)
Пример #5
0
def get_comment():
    cm = comment.Comment()
    data = cm.auto_view(int(request.form["gqCount"]))
    return jsonify({"count": request.form["gqCount"], "data": data})
Пример #6
0
 def get(self):
     if self.app.pargs.song != None:
         comment.Comment().get_music(self.app.pargs.song)
         lyric.Lyric().get_lyric(self.app.pargs.song)
     if self.app.pargs.playlist != None:
         music.Music().get_playlist(self.app.pargs.playlist)