2022-04-17 07:25:49 -07:00
|
|
|
package interfaces
|
|
|
|
|
|
|
|
import (
|
2022-04-29 13:02:25 -07:00
|
|
|
"github.com/go-rod/rod"
|
2022-04-17 07:25:49 -07:00
|
|
|
"github.com/mmcdole/gofeed"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Sources interface {
|
|
|
|
CheckSource() error
|
|
|
|
PullFeed() (*gofeed.Feed, error)
|
2022-04-29 13:02:25 -07:00
|
|
|
|
|
|
|
GetBrowser() *rod.Browser
|
|
|
|
GetPage(parser *rod.Browser, url string) *rod.Page
|
|
|
|
|
|
|
|
ExtractThumbnail(page *rod.Page) (string, error)
|
|
|
|
ExtractPubDate(page *rod.Page) (string, error)
|
|
|
|
ExtractDescription(page *rod.Page) (string, error)
|
|
|
|
ExtractAuthor(page *rod.Page) (string, error)
|
|
|
|
ExtractAuthorImage(page *rod.Page) (string, error)
|
|
|
|
ExtractTags(page *rod.Page) (string, error)
|
|
|
|
ExtractTitle(page *rod.Page) (string, error)
|
|
|
|
}
|
|
|
|
|