-
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
Add Frieze.js #1259
Add Frieze.js #1259
Conversation
ready for review
|
@owcz -- much preferred to get item type right in `detectWeb`. Among other things, otherwise tests fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general -- see if my question about not excluding /event and /media items from multiples makes sense.
|
||
|
||
function detectWeb(doc, url) { | ||
if (url.includes("/article/") { // does not handle /event/ or /media/ pages, which EM alone can handle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For those /event and media pages, you should be able to exclude them from the EM fixes you make in scrape, right? That way they'd work correctly when imported as part of search results (currently that'd e.g. all turn them into blogposts)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event/media pages are basically listings, so I didn't think anyone would want to cite them like we wouldn't handle classified ads in a newspaper (hence why I excluded them from the multis)
Let me know if you'd still want them
let href = rows[i].href; | ||
let title = ZU.trimInternal(rows[i].textContent); | ||
if (!href || !title) continue; | ||
if (/\/(event|media)\//.test(href)) continue; // scrap items that link to /event/ or /media/ pages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if what I say above is right, you could then remove this restriction.
Thanks! |
Art magazine https://frieze.com/