Add types
This commit is contained in:
@@ -25,25 +25,6 @@ func ParseHTML(html string) ([]string, error) {
|
||||
return res, nil
|
||||
}
|
||||
|
||||
//doc, err := goquery.NewDocumentFromReader(strings.NewReader(*task.Html))
|
||||
//if err != nil {
|
||||
// Error.Printf("failed to parse html: %v", err)
|
||||
// return
|
||||
//}
|
||||
|
||||
//doc.Find("img").Each(func(i int, s *goquery.Selection) {
|
||||
// parent := s.Parent()
|
||||
// if parent.Is("a") {
|
||||
// href, _ := parent.Attr("href")
|
||||
// href, ok := fixLink(href)
|
||||
// if ok {
|
||||
// hw.output <- &ImageDownloadTask{Url: &href, Topic: task.Topic}
|
||||
// }
|
||||
// } else {
|
||||
// src, _ := s.Attr("src")
|
||||
// src, ok := fixLink(src)
|
||||
// if ok {
|
||||
// hw.output <- &ImageDownloadTask{Url: &src, Topic: task.Topic}
|
||||
// }
|
||||
// }
|
||||
//})
|
||||
func ParseDoc(html string) ([]string, error) {
|
||||
return nil, nil
|
||||
}
|
Reference in New Issue
Block a user