This script would have actually broken quite a while ago when the <b> tags were added to the v6 addresses in the hopes of people noticing the variance in them.
That said, you're going to hate me. That page will be changing yet again, and a bit more of a shift than before. However, there's now a new means of pulling the data, and this format isn't due for changing anytime soon.
https://username:password@tunnelbroker.net/tunnelInfo.php[?tid=tunnel_id] The option is... optional. Username and password are in the clear, but it is over HTTPS, and this mechanism lines up with the dyndns methods, but this data is read-only.
The return will be a XML formatted output of your tunnel specifics, similar to the following. If you pass the tid, you'll only get the one tunnel's data.
<?xml version="1.0" encoding="UTF-8"?>
<tunnels>
<tunnel id="###">
<description>Demo</description>
<serverv4>72.52.104.74</serverv4>
<clientv4>10.2.2.2</clientv4>
<serverv6>2001:db8:1::1</serverv6>
<clientv6>2001:db8:1::2</clientv6>
<routed64>2001:db8:2::/64</routed64>
<routed48>2001:db8:3::/48</routed48>
<rdns1>ns1.he.net</rdns1>
<rdns2>ns2.he.net</rdns2>
<rdns3>ns3.he.net</rdns3>
<rdns4>ns4.he.net</rdns4>
<rdns5>ns5.he.net</rdns5>
</tunnel>
</tunnels>