开发者

Crawler, relative path to absolute path

I am trying to fetch pages using "httpwebrequest", but the links also have relative path in them like (.../something/, ../.../something/) , i am trying to map them to absolute path, i am not too good at programming, do we开发者_Go百科 have any utility helpers to do the job, any links, articles, tutorials appreciated.

Thank you in advance.


var base = new Uri("http://stackoverflow.com/a/b/c/d.html");
var relative = new Uri(base, "../e.html"); // http://stackoverflow.com/a/b/e.html

Uri(Uri, String)
Uri.AbsolutePath

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜