Scraper: creators of different types

I want to add a creator not listed on the page I am scraping. Can I do that with a scraper, or is that something the framework is not able to do?

Is there anyway to use a scraper and still specify two different creatorTypes for the creators?

I know the editor for the entire encyclopedia and want to add that as well as the author.

creators : FW.Xpath('//span[@id="header_author_text"]').text().append(",Leslie Stephen").split(/,/).cleanAuthor("author").cleanAuthor("editor"),

Is there anyway to get something like the above to work to assign the role of editor to the second name?
  • not with FW directly I'm afraid, but you can add a hook along the lines of:

    hooks : { "scraperDone": function (item,doc, url) {
    item.creators.push({
    "firstName": "Leslie"
    "lastName": "Stephen"
    "creatorType": "editor"
    })
    }}

    See more towards the bottom here:
    https://www.zotero.org/support/dev/translators/framework

    (Btw. a note on terminology: We refer to a "Scraper" as any translator that gets all relevant metadata from the page. Scrapers can be written with the Framework or just as regular javascript translators).
  • Where exactly does this code go, after the scraper items, or outside the scraper brackets?

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.