WebDevStudios / Automatic-Featured-Images-from-Videos

If a YouTube or Vimeo video exists in the first few paragraphs of a post, automatically set the post's featured image to that vidoe's thumbnail.
33 stars 24 forks source link

Exclude user profile urls from youtube regex consideration #52

Closed tw2113 closed 3 years ago

tw2113 commented 6 years ago

Need to change:

'#\/\/(www\.)?(youtu|youtube|youtube-nocookie)\.(com|be)\/(watch|embed)?\/?(\?v=)?([a-zA-Z0-9\-\_]+)#'

to

'#\/\/(www\.)?(youtu|youtube|youtube-nocookie)\.(com|be)\/(?!.*user)(watch|embed)?\/?(\?v=)?([a-zA-Z0-9\-\_]+)#'

When committing, credit @wongm with original credit. https://wordpress.org/support/topic/fix-for-youtube-user-links/

tw2113 commented 6 years ago

Needs refreshed after eventual merge of #54

tw2113 commented 3 years ago

This one may be interesting to merge in, but 2d89bfa