Documentation ¶
Index ¶
Constants ¶
View Source
const ( HOST_HACKERNEWS = "news.ycombinator.com" HOST_YOUTUBE = "www.youtube.com" )
View Source
const BaseUrl = "https://readability.theboys.tech/api/parser?url="
Variables ¶
View Source
var InvalidURLError = errors.New("Inavlid url")
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct { Title string `json:"title"` Content string `json:"content"` Author string `json:"author"` DatePublished string `json:"date_published"` LeadImageURL string `json:"lead_image_url"` Dek string `json:"dek"` NextPageURL string `json:"next_page_url"` URL string `json:"url"` Domain string `json:"domain"` Excerpt string `json:"excerpt"` WordCount int `json:"word_count"` Direction string `json:"direction"` TotalPages int `json:"total_pages"` RenderedPages int `json:"rendered_pages"` }
Content is the content of a url https://github.com/postlight/parser
{ "title": "Thunder (mascot)", "content": "... <p><b>Thunder</b> is the <a href=\"https://en.wikipedia.org/wiki/Stage_name\">stage name</a> for the...", "author": "Wikipedia Contributors", "date_published": "2016-09-16T20:56:00.000Z", "lead_image_url": null, "dek": null, "next_page_url": null, "url": "https://en.wikipedia.org/wiki/Thunder_(mascot)", "domain": "en.wikipedia.org", "excerpt": "Thunder Thunder is the stage name for the horse who is the official live animal mascot for the Denver Broncos", "word_count": 4677, "direction": "ltr", "total_pages": 1, "rendered_pages": 1 }
type HackerNewsParser ¶
type HackerNewsParser struct{}
type SubTitleParser ¶ added in v0.0.15
type SubTitleParser struct { Title string `json:"title"` Duration string `json:"duration"` DurationRaw string `json:"duration_raw"` Uploader string `json:"uploader"` Thumbnail string `json:"thumbnail"` Type string `json:"type"` Request struct { Url string `json:"url"` Hash string `json:"hash"` Domain string `json:"domain"` } `json:"request"` Formats []struct { Quality string `json:"quality"` Url string `json:"url"` Code string `json:"code"` Ext string `json:"ext"` } `json:"formats"` }
type YoutubeParser ¶ added in v0.0.15
type YoutubeParser struct{}
Click to show internal directories.
Click to hide internal directories.