diff --git a/src/you_get/extractors/facebook.py b/src/you_get/extractors/facebook.py
index 72ce8f31..2a96fcb0 100644
--- a/src/you_get/extractors/facebook.py
+++ b/src/you_get/extractors/facebook.py
@@ -9,17 +9,22 @@ def facebook_download(url, output_dir='.', merge=True, info_only=False, **kwargs
html = get_html(url)
title = r1(r'
(.+)', html)
- sd_urls = [
+ sd_urls = list(set([
unicodize(str.replace(i, '\\/', '/'))
for i in re.findall(r'"sd_src_no_ratelimit":"([^"]*)"', html)
- ]
+ ]))
+ hd_urls = list(set([
+ unicodize(str.replace(i, '\\/', '/'))
+ for i in re.findall(r'"hd_src_no_ratelimit":"([^"]*)"', html)
+ ]))
+ urls = hd_urls if hd_urls else sd_urls
- type, ext, size = url_info(sd_urls[0], True)
- size = urls_size(sd_urls)
+ type, ext, size = url_info(urls[0], True)
+ size = urls_size(urls)
print_info(site_info, title, type, size)
if not info_only:
- download_urls(sd_urls, title, ext, size, output_dir, merge=False)
+ download_urls(urls, title, ext, size, output_dir, merge=False)
site_info = "Facebook.com"
download = facebook_download