-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: canPlay is returning true for all facebook URLs #793
Comments
If anyone can find or create a regex pattern that matches all playable facebook URLs (and solves #778) I'll be happy to use it. |
@paulincai That pattern doesn't match the URL in #778 I'm tempted by this: ^https?://www\.facebook\.com.*/(video|watch).+$ Which just matches any |
@cookpete I've improved it a bit to not match any facebook pages which include |
@cookpete I get it. Not related to the present issue/task, the thing is that I use a scrapper for all web content that lands in my platform and the URL in #778, "https://www.facebook.com/watch/?v=499831560618548" ends up as "https://www.facebook.com/francknicolasofficiel/videos/499831560618548/" And now I remember that I decided to rely on the scrapper for consistency of all URLs having them correctly formatted before saving to DB. I am for @sapkra 's regex. I think it covers well. |
Nice one @sapkra. Updated and published in |
ok, here's another one, at least for the reference. There is a video URL format which re-re-directs in Facebook. This is a video content: https://www.facebook.com/story.php?story_fbid=10156618238668888&id=9328458887 the video URL is https://www.facebook.com/adidasoriginals/videos/10156618238668888/ |
@paulincai Updated the regex in my link to also match this one if necessary. |
Updated regex in |
Current Behavior
After the new update the
canPlay
function is returningtrue
for all facebook URLs because of the new matcher. This results in a lot of false positives.Expected Behavior
canPlay
should only returntrue
if it actually can be played.The text was updated successfully, but these errors were encountered: