remove author column from articles
This commit is contained in:
@@ -59,7 +59,7 @@ func (c *Collector) ExtractSpiegel(url string, body []byte) error {
|
||||
whitespace := regexp.MustCompile(`\s+`)
|
||||
|
||||
var exists bool
|
||||
var pagetype, title, content, datestr, author string
|
||||
var pagetype, title, content, datestr string
|
||||
var tag *goquery.Selection
|
||||
var date time.Time
|
||||
|
||||
@@ -113,13 +113,6 @@ func (c *Collector) ExtractSpiegel(url string, body []byte) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// get author
|
||||
tag = doc.Find("meta[name='author']")
|
||||
author, exists = tag.Attr("content")
|
||||
if !exists {
|
||||
return errors.New("unable to extract article, no author tag")
|
||||
}
|
||||
|
||||
// get content
|
||||
tag = doc.Find("main[id='Inhalt'] div > p")
|
||||
|
||||
@@ -139,7 +132,6 @@ func (c *Collector) ExtractSpiegel(url string, body []byte) error {
|
||||
FetchDate: time.Now(),
|
||||
Title: title,
|
||||
Content: content,
|
||||
Author: author,
|
||||
}
|
||||
|
||||
err = c.Articles.Insert(&article)
|
||||
|
||||
Reference in New Issue
Block a user