@hackage download0.3.2.7
High-level file download based on URLs
Categories
License
BSD-3-Clause
Maintainer
Sibi Prabakaran <sibi@psibi.in>
Links
Versions
Installation
Tested Compilers
Dependencies (5)
Dependents (6)
@hackage/usb-id-database, @hackage/black-jewel, @hackage/acme-everything, @hackage/hackage-sparks, @hackage/hackage2hwn, @hackage/implicit
download
Download web content as strict bytestring, strings, HTML tags, XML, RSS or Atom feeds or JSON, via HTTP, FTP or file protocols, using a URL interface.
Using the library:
Importing the library:
import Network.Download
Loading a webpage as a ByteString:
doc <- openURI "http://google.com"
Loading from a file:
doc <- openURI "file:///tmp/A.hs"
Loading a HTML page as a list of tags:
tags <- openAsTags "http://google.com"
Loading a HTML page as XML:
tags <- openAsXML "http://google.com"
Loading an RSS or Atom feed:
feed <- openAsFeed "http://google.com"
These data types can the be processed further with the XML, Feed and TagSoup libraries.