Skip to content

Commit

Permalink
fix facebook extractor #500 (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeke80215 authored and iawia002 committed Sep 13, 2019
1 parent 7a03dec commit 7b512fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions extractors/facebook/facebook.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ func Extract(url string) ([]downloader.Data, error) {

streams := map[string]downloader.Stream{}
for _, quality := range []string{"sd", "hd"} {
u := utils.MatchOneOf(
srcElement := utils.MatchOneOf(
html, fmt.Sprintf(`%s_src:"(.+?)"`, quality),
)[1]
)
if srcElement == nil {
continue
}
u := srcElement[1]
size, err := request.Size(u, url)
if err != nil {
return downloader.EmptyList, err
Expand Down

0 comments on commit 7b512fa

Please sign in to comment.