【发布时间】:2013-11-03 20:21:36
【问题描述】:
我想从海盗湾的搜索查询中获取源代码,我的代码中有这个,但它没有返回任何内容:
WebClient webpage = new WebClient();
string source= webpage.DownloadString("http://thepiratebay.sx/search/documentary/0/99/0");
【问题讨论】:
-
必须正常工作。你的预期结果是什么?
-
WebClient 工作正常,因为您得到一个空字符串,这可能是 url 错误
-
我的预期结果是该网页的源代码,但它给我一个空字符串
-
您是否有可能导致出站连接失败或将您重定向到另一个页面的防火墙或代理?
-
不,我没有防火墙或防病毒软件或任何东西
标签: c# webclient downloadstring