how do i parse live html from a website and extrac

2019-07-22 11:18发布

The info i need extracted is formatted:

<TD><A HREF="http://xxxxx.com/xxxxxx/index.html"><IMG SRC="../xxxxx/thumbnails/xxxxx.jpg">    </A></TD>
<TD>=== <B><A HREF="http://xxxxxxxxx.com/xxxxxxxx/index.html">LINE 0</A></B> ===<BR>
<FONT SIZE="2" COLOR="#400080">
Line 1<BR>
Line 2<BR>
Line 3
</FONT>
</TD>

how do i extract the info between TD=== and /a and Line 1,2, and 3 and store it into a database from a live website

2条回答
看我几分像从前
2楼-- · 2019-07-22 11:47

It seems like you're looking for information about scraping a website. There are a lot of tools that can help you with this, perhaps you could start here: web scraping using visual basic (blogs.msdn.com)

查看更多
淡お忘
3楼-- · 2019-07-22 11:47

If you'd like to do using PHP, here is a PHP inbuilt function.

You can use the following function and it will give you string between ===

<?php
    preg_match_all("/===(.*)===/", $source, $matches);
?>

$source is your html and $matches will return you the array of possible strings.

查看更多
登录 后发表回答