news

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIURL = "https://finviz.com/news.ashx"
)

Variables

View Source
var SourceAttributeLookup = map[string]string{
	"is-1":   "MarketWatch",
	"is-2":   "WSJ",
	"is-3":   "Reuters",
	"is-4":   "Yahoo Finance",
	"is-5":   "CNN",
	"is-6":   "The New York Times",
	"is-7":   "Bloomberg",
	"is-9":   "BBC",
	"is-10":  "CNBC",
	"is-11":  "Fox Business",
	"is-102": "Mish's Global Economic Trend Analysis",
	"is-105": "Trader Feed",
	"is-113": "Howard Lindzon",
	"is-114": "Seeking Alpha",
	"is-121": "The Disciplined Investor",
	"is-123": "Fallond Stock Picks",
	"is-132": "Zero Hedge",
	"is-133": "market folly",
	"is-136": "Daily Reckoning",
	"is-137": "Vantage Point Trading",
	"is-141": "Abnormal Returns",
	"is-142": "Calculated Risk",
}

SourceAttributeLookup provides an interface for identifying news sources based on their CSS attributes

Functions

func BySourceScrape added in v1.0.6

func BySourceScrape(doc *goquery.Document) ([][]string, error)

func ByTimeScrape added in v1.0.6

func ByTimeScrape(doc *goquery.Document) ([][]string, error)

func GenerateURL added in v1.0.6

func GenerateURL(view string) (string, error)

func Scrape added in v1.0.6

func Scrape(view string, doc *goquery.Document) ([][]string, error)

Types

type Client added in v1.0.6

type Client struct {
	*http.Client
	// contains filtered or unexported fields
}

func New added in v1.0.6

func New(config *Config) *Client

func (*Client) Do added in v1.0.6

func (c *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) GetNews added in v1.0.6

func (c *Client) GetNews(view string) (*dataframe.DataFrame, error)

GetNews returns a DataFrame containing recent news data

type Config added in v1.0.6

type Config struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL