Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdated Researchgate translator #2199
Conversation
Thanks! I have one question in line. Beyond that, please remove all the debugging code (if there's a particularly useful step you can lead 1-2 in, but currently that's too much) and relint |
if (!type) { | ||
Zotero.debug('trying different way'); | ||
type = text(doc, "b[research-meta-type]"); |
This comment has been minimized.
This comment has been minimized.
adam3smith
Jun 28, 2020
Collaborator
I'm seeing [data-testid="research-meta-type"]
Are you sure about this?
This comment has been minimized.
This comment has been minimized.
step21
Jun 28, 2020
Author
Yeah, I might be wrong, but hard to say with tags not always being the same. (plus I am not always sure how text() or attr() filters and couldn't find anything in the docs. It definitely is not XPaths anymore.
This comment has been minimized.
This comment has been minimized.
adam3smith
Jun 28, 2020
Collaborator
text()
and attr()
use CSS Selectors. See https://www.mediawiki.org/wiki/Citoid/Creating_Zotero_translators#Common_code_blocks_in_translators for good documentation
step21 commentedJun 27, 2020
Hey, with this update ResearchGate translator kind of works again. Sometimes item type still fails to be detected though, as classes are sometimes there or not... or maybe detectWeb also could use RIS directly?
Would be great to merge this especially for items that have no doi, let me know what you think and if it needs any changes.