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

Vimeo Only Intermittently Detected/Processed #39

Closed CrowdForge closed 6 years ago

CrowdForge commented 7 years ago

Tried various Vimeo videos in bulk and single and many fail to process.

binarygary commented 7 years ago

Suggest closing https://github.com/WebDevStudios/Automatic-Featured-Images-from-Videos/issues/38 as the issue is the same.

Current logic: Check if the content contains a vimeo URL.
If so we proceed to wds_get_vimeo_details() and retrieve details.

However, the current logic assumes the video was 200 and not 301 or 404. As a result a 301 or 404 video will not load the a video URL but will present with a vimeo id meaning we set meta as though a valid video exists.

tw2113 commented 6 years ago

Not pushed yet due to public wifi restrictions, but we will not save if we don't have data available. Instead of checking for the existence of the video ID, which we will have, we'll instead only save if we have data about the video.