打开网页编程并检索其包含的HTML作为字符串 [英] Open webpage programmatically and retrieve its html contain as a string

查看:131
本文介绍了打开网页编程并检索其包含的HTML作为字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Facebook帐户,我想提取我的朋友的照片及个人等细节等等。在研究了,出生日期。我能提取Facebook的第一个页面的地址,我的每个朋友帐户,但我不知道,我的每个朋友的第一页如何以编程方式打开网页并保存HTML包含作为字符串,这样我可以提取出他们的个人细节和照片。请帮忙! !预先感谢

I have a facebook account and I would like to extract my friend's photo and its personal detail such as "Date of birth", "Studied at" and so on. I am able to extract the address of the facebook's first page for each of my friends account but I don't know how to programmatically open webpage for each of my friends first page and save the html contain as a string so that I can extract out their personal detail and photos. Please help! Thank in advance!

推荐答案

试试这个:

var html = new WebClient()
               .DownloadString("the facebook account url goes here");



此外,一旦你已经下载的HTML作为字符串我会强烈建议您使用 HTML敏捷性包来分析它。

这篇关于打开网页编程并检索其包含的HTML作为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆