Skip to content

Commit 9a1629c

Browse files
authored
Merge pull request #4 from Abss0x7tbh/master
Adds scraping of data-src attributes
2 parents fbeb172 + 7d36b06 commit 9a1629c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,13 @@ func getScriptSrc(url string) ([]string, error) {
210210
// Find the script tags, and get the src
211211
doc.Find("script").Each(func(i int, s *goquery.Selection) {
212212
src, _ := s.Attr("src")
213+
dsrc, _ := s.Attr("data-src")
213214
if src != "" {
214215
sources = append(sources, src)
215216
}
217+
if dsrc != "" {
218+
sources = append(sources, dsrc)
219+
}
216220
})
217221

218222
return sources, nil

0 commit comments

Comments
 (0)