<td>
<a title="打开新窗口" href="read.php?tid-996919-fpage-9991.html" target="_blank">
<img src="images/colorImagination/thread/reward.gif" border=0 align="absmiddle"></a>
</td>
<td style="text-align:left;line-height:23px;" id="td_996919">
<a href="thread.php?fid-48-type-1.html" class="s8">[论坛板块A]</a>
<h3>
<span class="s1">— 悬赏金额:550 —</span>
<a href="read.php?tid-996919-fpage-9991.html" id="a_ajax_996919">帖子标题A </a></h3>
</td>
<td class="tal y-style">
<a href="u.php?action-show-uid-285919.html" class="bl">用户甲</a>
<div class="f10 gray2">2020-11-06</div></td>
<td class="tal y-style f10">
<span class="s8">0</span>/ 1252</td>
<td class="tal y-style">
<a href="read.php?tid-996919-page-e-fpage-9991.html#a" class="f10">2020-11-06 18:59</a>
<br />
<span class="gray2">by: bcc099a0</span></td>
</tr>
<tr align="center" class="tr3 t_one">
<td>
<a title="打开新窗口" href="read.php?tid-995670-fpage-9997.html" target="_blank">
<img src="images/colorImagination/thread/reward.gif" border=0 align="absmiddle"></a>
</td>
<td style="text-align:left;line-height:23px;" id="td_995670">
<a href="thread.php?fid-48-type-1.html" class="s8">[论坛B板块]</a>
<h3>
<a href="read.php?tid-995670-fpage-9997.html" id="a_ajax_995670">求这个图片里面的游戏</a></h3>
</td>
<td class="tal y-style">
<a href="u.php?action-show-uid-1003438.html" class="bl">用户张三</a>
<div class="f10 gray2">2020-11-05</div></td>
<td class="tal y-style f10">
<span class="s8">4</span>/ 1465</td>
<td class="tal y-style">
<a href="read.php?tid-995670-page-e-fpage-9997.html#a" class="f10">2020-11-05 17:06</a>
<br />
<span class="gray2">by: 3993ec20</span></td>
</tr>
<tr>
<td colspan="6" class="f_one" style="height:8px"></td>
</tr>
<td>
<a title="打开新窗口" href="read.php?tid-991234-fpage-9997.html" target="_blank">
<img src="images/colorImagination/thread/reward.gif" border=0 align="absmiddle"></a>
</td>
<td style="text-align:left;line-height:23px;" id="td_995670">
<a href="thread.php?fid-48-type-1.html" class="s8">[论坛B板块]</a>
<h3>
<span class="s1">— 悬赏金额:400 —</span>
<a href="read.php?tid-991234-fpage-9997.html" id="a_ajax_995670">游戏存档</a></h3>
</td>
<td class="tal y-style">
<a href="u.php?action-show-uid-1003438.html" class="bl">用户李四</a>
<div class="f10 gray2">2020-11-22</div></td>
<td class="tal y-style f10">
<span class="s8">4</span>/ 1465</td>
<td class="tal y-style">
<a href="read.php?tid-995670-page-e-fpage-9997.html#a" class="f10">2020-11-05 17:06</a>
<br />
<span class="gray2">by: 3993ec20</span></td>
</tr>
<tr>
<td colspan="6" class="f_one" style="height:8px"></td>
</tr>想抓取论坛里所有的帖子,但是一页页打开再抓取太慢了
我从网页里提取了网页源代码,除去模版后剩下的是格式差不多的这样的代码和一些不影响页面的代码
一页是40条帖子,为了方便各位协助,精简成了上面的代码,是其中三条帖子的示例
经过学习正则表达式,现在能提取出所有需要的数据了,但是现在卡在一个问题上
就是有的帖子是没有“悬赏金额:XXX”的,也就是没有下面这个标签
<span class="s1">— 悬赏金额:550 —</span>我想要达成如果有那就录入“悬赏金额:550”那就录入为空或者“无”,不能跟其他帖子混淆了
最后形成这么一个表格【抬头就是字段名】来录入数据库
| 板块 | 悬赏 | 标题 | 链接 | 发布者 | 时间 |
| [论坛板块A] | 悬赏金额:550 | 帖子标题A | read.php?tid-996919-fpage-9991.html | 用户甲 | 2020-11-6 |
| [论坛B板块] | 无 | 求这个图片里面的游戏 | read.php?tid-995670-fpage-9997.html | 用户张三 | 2020-11-5 |
| [论坛B板块] | 悬赏金额:400 | 游戏存档 | read.php?tid-991234-fpage-9997.html | 用户李四 | 2020-11-22 |
但是当第二个帖子的悬赏金额是空的时候,表格会错位成
| 板块 | 悬赏 | 标题 | 链接 | 发布者 | 时间 |
| [论坛板块A] | 悬赏金额:550 | 帖子标题A | read.php?tid-996919-fpage-9991.html | 用户甲 | 2020-11-6 |
| [论坛B板块] | 悬赏金额:400 | 求这个图片里面的游戏 | read.php?tid-995670-fpage-9997.html | 用户张三 | 2020-11-5 |
| [论坛B板块] | 游戏存档 | read.php?tid-991234-fpage-9997.html | 用户李四 | 2020-11-22 |
原本是第三个帖子的悬赏金额跑到第二个帖子了,第三个帖子的悬赏却变成空了。

这个应该怎么处理,请大佬们赐教