Closed sotetsuk closed 8 years ago
To acquire the author information, we must get the BibTeX information.
See release v0.0.1-alpha
func (a *Article) crawlAndParseBibTeX() { popURL, err := CitePopUpQuery(a.InfoId) if err != nil { log.Fatal(err) } popDoc, err := goquery.NewDocument(popURL) if err != nil { log.Fatal(err) } bibURL, _ := popDoc.Find("#gs_citi > a:first-child").Attr("href") bibDoc, err := goquery.NewDocument(SCHOLAR_URL + bibURL) if err != nil { log.Fatal(err) } a.Bibtex = bibDoc.Text() }
GET_SETTINGS_URL
SET_SETTINGS_URL
Import into BibTeX
headers = { 'User-Agent': self.UA, 'Cookie': 'GSP=ID=%(ID)s:CF=%(CF)d' % { "ID": self.GID, "CF": self.cite_format } }
Access directly to
https://scholar.google.com/scholar.bib?q=info:0qfs6zbVakoJ:scholar.google.com/&output=citation
See: https://github.com/5kg/gscholar/blob/master/lib/gscholar/paper.rb
This solution fails:
WHY
To acquire the author information, we must get the BibTeX information.
How
1. Naive solution
See release v0.0.1-alpha
2. scholar.py's solution
GET_SETTINGS_URL
of scholar.py#L939SET_SETTINGS_URL
of scholar.py#L969Import into BibTeX
emerges. scholar.py#L457 scholar.py#L9943. hildensia/scholar.py's solution
4. gscholar's solution
Access directly to
See: https://github.com/5kg/gscholar/blob/master/lib/gscholar/paper.rb
This solution fails:
Related