ReadSharp was previously PocketSharp.Reader and is now hosted without the PocketSharp dependency.
What's it all about?
The library extracts the main content of a website and returns the extracted content as HTML and it's associated title, description, favicon and a all included images.
This content can be encapsulated in a <body>-Tag and displayed as a readable website with a custom CSS (it's up to you!).
ReadSharp is based on a custom PCL port of NReadability and SgmlReader, which are included in the solution.
Association with Pocket
This library is a replacement for the Article View API by Pocket, which is not only limited by usage and privacy, but also in it's way of extracting contents from websites.
Example
using ReadSharp;
Reader reader = new Reader();
Article article;
try
{
article = await reader.Read("http://frontendplay.com/story/4/http-caching-demystified-part-2-implementation");
}
catch (Exception exc)
{
// handle exception
}
Article Model
The Article contains following fields:
stringTitle (the title of the page)stringDescription (description of the page, extracted from meta information)stringContent (contains the article)UriFrontImage (main page image extracted from meta tags like apple-touch-icon and others)UriFavicon (the favicon of the page)List<ArticleImage>Images (contains all images found in the text)stringNextPage (contains the next page URI, if available)
Supported platforms
ReadSharp is a Portable Class Library, therefore it's compatible with multiple platforms:
- .NET >= 4.0.3 (including WPF)
- Silverlight >= 4
- Windows Phone >= 7.5
- Windows Store
Forked Dependencies
forks are included in the primary source code
Contributors
| ceee |
