class不一致时候,解析规则

l

[<span class="author-link-line">
<a class="author-link" data-hovercard="p$t$hui-yi-zui-hou" href="/people/hui-yi-zui-hou" target="_blank">我是一只小萌刀</a></span>, <span class="author-link-line">
<span class="name">知乎用户</span></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$tut_mok" href="/people/tut_mok" target="_blank">莫毒枭</a></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$su-fei-17" href="/people/su-fei-17" target="_blank">苏菲</a><span class="icon icon-badge-best_answerer icon-badge" data-tooltip="s$b$优秀回答者"></span></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$xiao-zhu-12-40-56" href="/org/xiao-zhu-12-40-56" target="_blank">小猪</a><span class="OrgIcon sprite-global-icon-org-14" data-tooltip="s$b$已认证的官方帐号"></span></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$shui-zhu-31" href="/people/shui-zhu-31" target="_blank">水烛</a></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$chen-jia-xin-99-40-43" href="/people/chen-jia-xin-99-40-43" target="_blank">山河</a></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$yuzheng-wang-78" href="/people/yuzheng-wang-78" target="_blank">Yuzheng Wang</a></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$hsuvon" href="/people/hsuvon" target="_blank">南枫Von</a></span>, <span class="author-link-line">
<a class="author-link" data-hovercard="p$t$zhong-nan-42-70-70" href="/people/zhong-nan-42-70-70" target="_blank">中南</a></span>]

取出用户名

author的class,有的是
class="author-link"
有的是
class="name"

转载于:https://www.cnblogs.com/wanglinjie/p/9249253.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值