[PICA] Handling electronic theses on sudoc.fr#3606
Open
symac wants to merge 1 commit intozotero:masterfrom
Open
[PICA] Handling electronic theses on sudoc.fr#3606symac wants to merge 1 commit intozotero:masterfrom
symac wants to merge 1 commit intozotero:masterfrom
Conversation
AbeJellinek
requested changes
Apr 27, 2026
| else if (type.includes('map.')) { | ||
| return "map"; | ||
| } | ||
| else if (type.includes('binary.') && (ZU.xpath(doc, '//tr/td[@class="rec_lable" and .//span[starts-with(text(), "Thèse")]]').length)) { |
Member
There was a problem hiding this comment.
Let's avoid adding more complicated XPaths, especially since XPath class matching breaks if the element has multiple class names:
Suggested change
| else if (type.includes('binary.') && (ZU.xpath(doc, '//tr/td[@class="rec_lable" and .//span[starts-with(text(), "Thèse")]]').length)) { | |
| else if (type.includes('binary.') && text(doc, 'td > td.rec_lable').includes('Thèse')) { |
should do it, I think.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
this request adds a test that will handle electronic theses as thesis rather than fallback on the book type on a record like : https://www.sudoc.fr/282427384
This should be improved to handle records when the language is set to German or English (and Thèse is changed to Dissertation) but right now, my scaffold version is not working with my test page https://www.sudoc.fr/282427384 (Linux, Zotero 9 but I have tried to reinstall 8.0.4 and it does not fix the issue). I assume it might be related to some redirect on sudoc's website which think scaffold is some sort of robot or something like that. It was working some weeks ago when I developed this before forgetting to create the PR.