Open powerdmy opened 7 years ago
atoHref is undefined
here is corrected code:
atoHref = $('.reply_author').eq(0).attr('href');
你好,造成这个问题的原因可能是因为当你爬取的数量过多或者是帖子下面没有回复的时候,atoHref=$('.reply_author').eq(0).attr('href')
的值会为undefined,造成TypeError: Parameter "url" must be a string, not undefined
错误
所以需要先验证if ($('.reply_author').eq(0).attr("href")!=undefined)
才行
在抓取用户score时,合并用户的url遇到错误