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

Rewrite TV by the Numbers #1360

Merged
merged 5 commits into from Oct 1, 2017

Conversation

Projects
None yet
4 participants
@sonali0901
Contributor

sonali0901 commented Jul 7, 2017

Fixes #149

@zuphilip

Looks good in general. A few comments and suggestions.

Show outdated Hide outdated TV by the Numbers.js
return reg.exec(xpmatch)[1];
function doWeb(doc, url) {

This comment has been minimized.

@zuphilip

zuphilip Jul 8, 2017

Collaborator

You already have the function doWeb above, i.e. this is duplicate content and should be deleted.

@zuphilip

zuphilip Jul 8, 2017

Collaborator

You already have the function doWeb above, i.e. this is duplicate content and should be deleted.

Show outdated Hide outdated TV by the Numbers.js
else if (author_text.indexOf(";") != -1)
authors = author_text.split(";");
translator.setHandler('itemDone', function(obj, item) {
item.date = ZU.strToISO(item.date);

This comment has been minimized.

@zuphilip

zuphilip Jul 8, 2017

Collaborator

Maybe check here before that item.date exists, i.e.

if (item.date) {
    item.date = ZU.strToISO(item.date);
}
@zuphilip

zuphilip Jul 8, 2017

Collaborator

Maybe check here before that item.date exists, i.e.

if (item.date) {
    item.date = ZU.strToISO(item.date);
}
Show outdated Hide outdated TV by the Numbers.js
if (authors[i].textContent == 'TV By The Numbers')
item.creators.push({
lastName: authors[i].textContent,
creatorType: "author",

This comment has been minimized.

@zuphilip

zuphilip Jul 8, 2017

Collaborator

Should we choose another role for this case?

@zuphilip

zuphilip Jul 8, 2017

Collaborator

Should we choose another role for this case?

This comment has been minimized.

@zuphilip

zuphilip Jul 16, 2017

Collaborator

Correct, but I don't think we want to have TV By The Numbers as author in any citation, which is actually the name of the blogTitle/websiteTitle. Maybe, we should ignore author information completely, when it is only mentioned TV By The Numbers. CC @adam3smith

@zuphilip

zuphilip Jul 16, 2017

Collaborator

Correct, but I don't think we want to have TV By The Numbers as author in any citation, which is actually the name of the blogTitle/websiteTitle. Maybe, we should ignore author information completely, when it is only mentioned TV By The Numbers. CC @adam3smith

This comment has been minimized.

@adam3smith

adam3smith Oct 1, 2017

Collaborator

I'll go with that, yes.

@adam3smith

adam3smith Oct 1, 2017

Collaborator

I'll go with that, yes.

Show outdated Hide outdated TV by the Numbers.js
return "multiple";
else if (doc.body.className.indexOf("single-post") > -1)
return "webpage";

This comment has been minimized.

@zuphilip

zuphilip Jul 8, 2017

Collaborator

Should we change this to blogPost, which might be less generic? Moreover, the website uses WordPress...

@zuphilip

zuphilip Jul 8, 2017

Collaborator

Should we change this to blogPost, which might be less generic? Moreover, the website uses WordPress...

Show outdated Hide outdated TV by the Numbers.js
"abstractNote": "Final broadcast primetime live + same-day ratings for Monday, July 3, 2017 The top show on a rerun-filled Monday night saw its adults 18-49 rating grow from the preliminary numbers to the finals. &…",
"shortTitle": "‘American Ninja Warrior’ adjusts up",
"url": "http://tvbythenumbers.zap2it.com/daily-ratings/monday-final-ratings-july-3-2017/",
"websiteTitle": "TV By The Numbers by zap2it.com",

This comment has been minimized.

@owcz

owcz Jul 10, 2017

Contributor

I'd set the website title in the scraper so that it reads "TV By The Numbers" (not the name EM found)

@owcz

owcz Jul 10, 2017

Contributor

I'd set the website title in the scraper so that it reads "TV By The Numbers" (not the name EM found)

Show outdated Hide outdated TV by the Numbers.js
if (authors[i].textContent == 'TV By The Numbers')
item.creators.push({
lastName: authors[i].textContent,
creatorType: "author",
Show outdated Hide outdated TV by the Numbers.js
"title": "Snapshot"
}],
"tags": [
"'",

This comment has been minimized.

@owcz

owcz Jul 10, 2017

Contributor

If the "Category" is blank (or a single quote) in all articles, it should be removed. Also title case works better than lower case for the tags. They're in title case within the article, if you want to pull those phrases instead of reworking what EM found

@owcz

owcz Jul 10, 2017

Contributor

If the "Category" is blank (or a single quote) in all articles, it should be removed. Also title case works better than lower case for the tags. They're in title case within the article, if you want to pull those phrases instead of reworking what EM found

@adam3smith adam3smith merged commit b1a7088 into zotero:master Oct 1, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@adam3smith

This comment has been minimized.

Show comment
Hide comment
@adam3smith

adam3smith Oct 1, 2017

Collaborator

Thanks!

Collaborator

adam3smith commented Oct 1, 2017

Thanks!

zuphilip added a commit to zuphilip/translators that referenced this pull request Mar 28, 2018

zuphilip added a commit to zuphilip/translators that referenced this pull request Mar 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment