Class Article
- Namespace
- SmartReader
- Assembly
- SmartReader.dll
Parsed article
public class Article
- Inheritance
-
ObjectArticle
- Inherited Members
-
Object.Equals(Object)Object.Equals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()Object.ReferenceEquals(Object, Object)Object.ToString()
Remarks
You should check the property IsReadable
to know whether an article was actually found
Properties
Author
public string Author { get; }
Property Value
- String
The author, which can be parsed or read in the metadata
Byline
public string Byline { get; }
Property Value
- String
The parsed byline
Content
public string Content { get; }
Property Value
- String
The HTML content
Converter
The function that will extract the text from the HTML content
public static Func<IElement, string> Converter { get; set; }
Property Value
- Func<IElement, String>
Default: return InnerHTML property
Dir
public string Dir { get; }
Property Value
- String
The direction of the writing
Excerpt
public string Excerpt { get; }
Property Value
- String
The excerpt provided by the metadata
FeaturedImage
public string FeaturedImage { get; }
Property Value
- String
The URI of the main image
IsReadable
public bool IsReadable { get; }
Property Value
- Boolean
It indicates whether an article was actually found
Language
public string Language { get; }
Property Value
- String
The language provided by the metadata
Length
public int Length { get; }
Property Value
- Int32
The length in bytes of
Content
PublicationDate
public DateTime? PublicationDate { get; }
Property Value
- Nullable<DateTime>
The publication date, which can be parsed or read in the metadata
Serializer
The function that will serialize the HTML content of the article
public static Func<IElement, string> Serializer { get; set; }
Property Value
- Func<IElement, String>
Default: return InnerHTML property
SiteName
public string SiteName { get; }
Property Value
- String
The name of the website, which can be parsed or read in the metadata
TextContent
public string TextContent { get; }
Property Value
- String
The pure-text content cleaned to be readable
TimeToRead
public TimeSpan TimeToRead { get; }
Property Value
- TimeSpan
The average time to read
Remarks
It is based on http://iovs.arvojournals.org/article.aspx?articleid=2166061
Title
public string Title { get; }
Property Value
- String
The clean title
Uri
public Uri Uri { get; }
Property Value
- Uri
The original URI of the source
Methods
ConvertImagesToDataUriAsync(Int64)
Convert images contained in the article to their data URI scheme representation
public Task ConvertImagesToDataUriAsync(long minSize = 75000L)
Parameters
minSize
Int64The minium size in bytes to be considered a image. Smaller images are removed
Returns
- Task
An empty Task object
GetImagesAsync(Int64)
Finds images contained in the article.
public Task<IEnumerable<Image>> GetImagesAsync(long minSize = 75000L)
Parameters
minSize
Int64The minium size in bytes to be considered a image.
Returns
- Task<IEnumerable<Image>>
A Task object with the images found