Browse Source

plugins.facebook: update onion address

pull/4095/head
Ian Cameron 2 weeks ago
committed by Sebastian Meyer
parent
commit
5225675ef5
  1. 8
      src/streamlink/plugins/facebook.py
  2. 2
      tests/plugins/test_facebook.py

8
src/streamlink/plugins/facebook.py

@ -12,9 +12,11 @@ from streamlink.utils.parse import parse_json
log = logging.getLogger(__name__)
@pluginmatcher(re.compile(
r"https?://(?:www\.)?facebook(?:\.com|corewwwi\.onion)/[^/]+/(?:posts|videos)/(?P<video_id>\d+)"
))
@pluginmatcher(re.compile(r"""
https?://(?:www\.)?facebook
(?:\.com|wkhpilnemxj7asaniu7vnjjbiltxjqhye3mhbshg7kx5tfyd\.onion)
/[^/]+/(?:posts|videos)/(?P<video_id>\d+)
""", re.VERBOSE))
class Facebook(Plugin):
_src_re = re.compile(r'''(sd|hd)_src["']?\s*:\s*(?P<quote>["'])(?P<url>.+?)(?P=quote)''')
_dash_manifest_re = re.compile(r'''dash_manifest["']?\s*:\s*["'](?P<manifest>.+?)["'],''')

2
tests/plugins/test_facebook.py

@ -10,7 +10,7 @@ class TestPluginCanHandleUrlFacebook(PluginCanHandleUrl):
"https://www.facebook.com/nytfood/videos/1485091228202006/",
"https://www.facebook.com/SporTurkTR/videos/798553173631138/",
"https://www.facebook.com/119555411802156/posts/500665313691162/",
"https://www.facebookcorewwwi.onion/SporTurkTR/videos/798553173631138/",
"https://www.facebookwkhpilnemxj7asaniu7vnjjbiltxjqhye3mhbshg7kx5tfyd.onion/SporTurkTR/videos/798553173631138/",
]
should_not_match = [

Loading…
Cancel
Save