Closed geofferb closed 2 months ago
- I think we can get all this data from page
<meta>
tags. Title is in<meta name="title">
, description is in<meta name="description">
, duration is in<meta itemprop="duration">
, etc.- We should not use any of these fallbacks if we aren't on the server (
Zotero.isServer
), because they won't change as you browse around the site and navigate to other videos in the mobile/desktop SPA.
@AbeJellinek I started with the Meta tags but switched to the microformat when I realized that the description meta tag only contained a truncated version of the description. If that's okay I'll use the Meta tags for everything.
I think it's alright if it's just on the server. Not ideal, but parsing the microformat is way messier, slower (because of the global regex search), and more prone to breakage.
Thank you!
Fixes #3290 by adding an extra fallback for Title, runningTime, Date, Duration, and Description fields based on a regex search for the microformat object, which can be found in the HTML regardless if the page's JS is loaded.