Documentation
¶
Index ¶
- Constants
- type Article
- type Profile
- type Scholar
- func (sch Scholar) QueryArticle(url string, article Article, dumpResponse bool) Article
- func (sch Scholar) QueryProfile(user string, limit int) []Article
- func (sch Scholar) QueryProfileDumpResponse(user string, queryArticles bool, limit int, dumpResponse bool) []Article
- func (sch Scholar) QueryProfileWithCache(user string, limit int) []Article
Constants ¶
View Source
const AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0"
View Source
const BaseURL = "http://scholar.google.com"
View Source
const MAX_TIME_ARTICLE = time.Second * 3600 * 24 * 7 // 1 week
View Source
const MAX_TIME_PROFILE = time.Second * 3600 * 24 // 1 day
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scholar ¶
type Scholar struct {
// contains filtered or unexported fields
}
func (Scholar) QueryArticle ¶
func (Scholar) QueryProfileDumpResponse ¶
func (sch Scholar) QueryProfileDumpResponse(user string, queryArticles bool, limit int, dumpResponse bool) []Article
QueryProfileDumpResponse queries the profile of a user and returns a list of articles if queryArticles is true, it will also query the articles for extra information which isn't present on the profile page
we may wish to set this to false if we are only interested in some article info, or we have a cache hit and we just want to get updated information from the profile page only to save requests
if dumpResponse is true, it will print the response to stdout (useful for debugging)
Click to show internal directories.
Click to hide internal directories.