Documentation ¶
Overview ¶
Package parser provides the parser for the telegram channel page.
Index ¶
- func FixEmoji(s *goquery.Selection) *goquery.Selection
- func FixLinks(s *goquery.Selection) *goquery.Selection
- func GetChannelWebURL(chName string) string
- func GetImages(s *goquery.Selection) []string
- func GetPageDescriptionHTML(doc *goquery.Document) string
- func GetPageImageURL(doc *goquery.Document) string
- func GetPageLink(doc *goquery.Document) string
- func GetPageTitle(doc *goquery.Document) string
- func GetPostCreated(s *goquery.Selection) time.Time
- func GetPostLink(s *goquery.Selection) string
- func GetPostTextHTML(s *goquery.Selection) string
- func GetPostTitle(text string) string
- func GetSafeHTML(s *goquery.Selection) string
- func GetVideos(s *goquery.Selection) []string
- func ParseDateTime(dt string) (time.Time, error)
- func RemoveUnsafeTags(s *goquery.Selection) *goquery.Selection
- func ShortenText(text string, maxLength int) string
- type Page
- type Post
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChannelWebURL ¶
GetChannelWebURL returns the channel web url based on the channel name
func GetPageDescriptionHTML ¶
GetPageDescriptionHTML returns the page description html
func GetPageImageURL ¶
GetPageImageURL returns the page image url
func GetPageTitle ¶
GetPageTitle returns the page title
func GetPostCreated ¶
GetPostCreated returns the post created datetime
func GetPostTextHTML ¶
GetPostTextHTML returns the post text as HTML
func GetSafeHTML ¶
GetSafeHTML returns the HTML string without unsafe tags
func ParseDateTime ¶
ParseDateTime parses the datetime string and returns the time.Time object
func RemoveUnsafeTags ¶
RemoveUnsafeTags removes all tags except <a>, <i>, <b>, <br>
func ShortenText ¶
ShortenText shortens the text to the specified length.
Types ¶
Click to show internal directories.
Click to hide internal directories.