ACS Publications translator not working on book TOCs

For example, http://pubs.acs.org/isbn/9780841239999

Regex seems to match (as an aside, doesn't the ? at the end make the parenthetical after the domain superfluous?).

My guess was that it had to do with the getSearchResults function. I tried adding 'class="articleBox chapterBox"', but I may be on the wrong track.
  • edited September 5, 2014
    Try to use "contains", i.e.

    return ZU.xpath(doc, '//div[contains(@class,"articleBox";) or contains(@class,"articleBox ")]');

    but then there is another error occuring on that example url...
  • ZU.xpath(doc, '//div[contains(@class,"articleBox")] works for me.

    A translator fix is now up. Your version of Zotero will automatically update within 24hs, or you can update manually using the "Update Now" button in the "General" tab of the Zotero preferences. If you're using Standalone, restart Zotero and your browser after updating.

    Any further problems let us know & thanks for reporting

    I think you're right about the question mark in the regex, btw., but I'm not going to toy with that on a Friday night after a couple of glasses of wine ;).
  • (@zuphilip - I believe with your xpath you'd get every node twice which I'd suspect caused the error when you tested)
  • Thanks; that seems to be picking it up fine.

    However, now it's not getting the pdf's, either from the TOC page or from the individual chapter pages. I'm guessing it's because this book only has the plain pdf's available, and not the "PDF w/ Links". Another book that does have the PDF w/ Links (http://pubs.acs.org/isbn/9780841229525) seems to be working fine. I can't say whether it was working previously. Seems like there's code for catching both kinds of pdf, but that's about as much as I can figure.

    On the regex question mark, if it were to be removed, "isbn" would probably need to be added to the regex so it would continue to match books. Of course, other things might break, too. Seems like now its just matching the entire domain, which probably isn't the worst thing in the world.
  • Attachments should be fixed now. Fixed the target regexp as well.
  • Attachments work for me.

    The regex now doesn't pick up book chapter pages, such as http://pubs.acs.org/doi/abs/10.1021/bk-2006-STYG.ch001
    Main book page works fine.
  • Sorry about that (Atypon translator was picking it up correctly, so I didn't notice). Should be fixed.
  • Looks good; thanks!
Sign In or Register to comment.