How would I download all kinds of file types from a website?

无人久伴 提交于 2019-12-01 12:16:05

Right now the following line:

HtmlNodeCollection imgs = doc.DocumentNode.SelectNodes("//img[@src]");

Is grabbing all image tags and processing them. You will need to find a way to find all anchor tags where the href extension equals .cs

It will be similar to the line above. I recommend reading up on xPath, since that appears to be what SelectNodes is using to find elements.

Hope this helps you get started!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!