python可视化分析网易云音乐评论_python 网易云音乐 评论爬取问题

除了使用phantomjs,selenium之外,怎么爬取多页评论,这两个都太慢了。例如http://music.163.com/#/song?i... 的 评论。

webapi都是http://music.163.com/weapi/v1...,

每页20个评论,怎么获取下一页的评论,param是加密的,post都不知道post什么数据

在网上有一种方式只能获取

def aes_encrypt(self, text, secKey):

pad = 16 - len(text) % 16

text = text + pad * chr(pad)

encryptor = AES.new(secKey, 2, '0102030405060708')

ciphertext = encryptor.encrypt(text)

ciphertext = base64.b64encode(ciphertext)

return ciphertext

def rsa_encrypt(self, text, pubKey, modulus):

text = text[::-1]

rs = int(text.encode('hex'), 16) ** int(pubKey, 16) % int(modulus, 16)

return format(rs, 'x').zfill(256)

def create_secret_key(self, size):

return (''.join(map(lambda xx: (hex(ord(xx))[2:]), os.urandom(size))))[0:16]

d

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值