Closed emptyset1 closed 8 years ago
Hi, I was trying to include Facebook into the basic list of providers. E.g., pr.register('https://www.facebook.com/\S*?/posts/\S*', Provider('https://www.facebook.com/plugins/post/oembed.json'))
or
pr.register('https://www.facebook.com/\S*/photos/\S*', Provider('https://www.facebook.com/plugins/post/oembed.json'))
work perfectly fine. However, when I try
pr.register('https://www.facebook.com/photo.php?fbid=\S*', Provider('https://www.facebook.com/plugins/post/oembed.json')) for a url like https://www.facebook.com/photo.php?fbid=10204669368414661&set=a.10201344709340262.1073741826.1849311083&type=3&theater it always comes back with the message "Provider not found for ..." What am I doing wrong? Is it the regular expression? Or is it an issue with the endpoints?
Many thanks for any feedback.
You need to escape the '?' character in the last regex.
'?'
Hi, I was trying to include Facebook into the basic list of providers. E.g., pr.register('https://www.facebook.com/\S*?/posts/\S*', Provider('https://www.facebook.com/plugins/post/oembed.json'))
or
pr.register('https://www.facebook.com/\S*/photos/\S*', Provider('https://www.facebook.com/plugins/post/oembed.json'))
work perfectly fine. However, when I try
pr.register('https://www.facebook.com/photo.php?fbid=\S*', Provider('https://www.facebook.com/plugins/post/oembed.json')) for a url like https://www.facebook.com/photo.php?fbid=10204669368414661&set=a.10201344709340262.1073741826.1849311083&type=3&theater it always comes back with the message "Provider not found for ..." What am I doing wrong? Is it the regular expression? Or is it an issue with the endpoints?
Many thanks for any feedback.