-
Notifications
You must be signed in to change notification settings - Fork 756
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
Update Polygon.js for 2018 #1253
Conversation
Some of the site's old "feature" articles (e.g., this one) use non-standard metadata (particularly re: author). Not sure how best to handle them—open to suggestions, or just ignoring them (they're not compatible with old translator either) |
I haven't looked at the differences in depth, but this is the type of things you'd find much easiert to address in a non-FW translator, where you could just cycle through a couple of ways of getting an author in turn. Given that you already have the existing structure, it'd makes sense to me to keep the old translator and just swap out the xpaths, then add checks for the other author options. |
The site's early Features (from several years ago) have inconsistent formatting, hence why I'm not particularly concerned about handling the edge cases. (FW handles 99% of the site's articles and is much easier to maintain.) @adam3smith Is there no way to do a secondary detection when FW.Scraper runs for "creators" and finds nothing? There is a fairly standard |
I think you could do a hook testing for an empty creators array and using the other options if you want to stick to FW -- I find it quickly gets easier to write regular translators once you start using hooks, but up to you. |
ready for review
|
Squashed, linted, updated (a little bit), and merged! Thank you :) |
authors was broken in prior format, rewritten in FW