Skip to content
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

Amazon Translator Inconsistencies: Title and Author #760

Closed
zuphilip opened this issue Jul 9, 2014 · 0 comments
Closed

Amazon Translator Inconsistencies: Title and Author #760

zuphilip opened this issue Jul 9, 2014 · 0 comments

Comments

@zuphilip
Copy link
Contributor

zuphilip commented Jul 9, 2014

Sometimes the author is not extracted correctly.

See https://forums.zotero.org/discussion/35061/amazon-translator-inconsistencies-title-and-author-fields/#Item_6

Example: http://www.amazon.com/dp/1409451712

The author is normally contained in the "nextLine" from the title. Sometimes one has to go over an intermediate line, here it seems that there is a second intermediate line. Maybe it is enough to nest another test into
https://github.com/zotero/translators/blob/master/Amazon.com.js#L170

    var nextLine = get_nextsibling(titleNode);
    if ( ZU.xpath(nextLine, './/a[@href]').length == 0 && nextLine.tagName != "A") { //e.g. http://www.amazon.com/dp/1118728963
        nextLine = get_nextsibling(nextLine);
        if ( ZU.xpath(nextLine, './/a[@href]').length == 0 && nextLine.tagName != "A") { //e.g. http://www.amazon.com/dp/1409451712
            nextLine = get_nextsibling(nextLine);
        }
    }

But I don't have time to test it properly...

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

No branches or pull requests

1 participant