How can I download files form web pages?
Some web pages, having their urls, have "Download" Text, which are hyperlinks.
How can I g开发者_开发技巧et the hyperlinks form the urls/pages by python or ironpython.
And can I download the files with these hyperlinks by python or ironpython? How can I do that?
Are there any C# tools?
I am not native english speaker, so sorry for my english.
You should be able to use the BeautifulSoup library with CPython (normal Python) and IronPython. Check out the findAll() method. This should pull out a list of all the links.
soup.findAll('a')
The easiest way would be to pass the HTML page into an XML/HTML parser, and then call getElementsByTagName("A")
on the root node. Once you get that, iterate through the list and pull out the href
parameter.
精彩评论