从网页(Web爬虫)中提取所有链接(Extract all links from Web page(Web crawler))

编程入门 行业动态 更新时间:2024-10-21 06:01:49
从网页(Web爬虫)中提取所有链接(Extract all links from Web page(Web crawler))

我想开发一个应用程序我给它的特定网站的Urls,它从该网页中提取所有链接。 这里我想把它的Url发给我的应用程序的网页是由Asp.net开发的,包含一个Search buttom,一个用于显示结果的GridView和一个DataPager,GridView包含用于绑定搜索结果的HyperLinkField控件。

当我单击目标页面的搜索按钮时,页面将被回发并通过GridView显示搜索结果而不更改页面的URL。

例如,如果搜索结果有500条记录而datapager.PageSize = 10则我们有50页。

现在我想知道是否可以使用我的应用程序一次性提取绑定到Gridview的所有500个链接,除了打开所有50个页面并使用我的应用逐个提取任何页面?

谢谢。

I Want to develope an app I give Urls of specific website to it,and it extract all links from that Web page. Here the web page that I want to give it's Url to my app,is developed by Asp.net and contains a Search buttom ,a GridView for showing the result and a DataPager ,and GridView contains HyperLinkField control for binding to the search's result.

When I click the Search buttom of the goal page the page is postbacked and show search result by GridView without changing the url of the page.

For example if search result have 500 records and datapager.PageSize=10 then we have 50 pages.

Now I want to know is it possible to extract all 500 links that binded to Gridview at once with my app,except opening all 50 pages and extract any page one by one with my app?

Thanks.

最满意答案

您可以使用回发来解析ASP.NET页面:

使用回发解析.Net页面 http://www.dreamincode.net/forums/topic/57101-website-scraping-and-postback/

You can parse ASP.NET page with postbacks :

Parse a .Net Page with Postbacks http://www.dreamincode.net/forums/topic/57101-website-scraping-and-postback/

更多推荐

本文发布于:2023-08-05 18:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1437429.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:爬虫   链接   网页   Web   crawler

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!