Skip to content

[PICA] Handling electronic theses on sudoc.fr#3606

Open
symac wants to merge 1 commit intozotero:masterfrom
abes-esr:master
Open

[PICA] Handling electronic theses on sudoc.fr#3606
symac wants to merge 1 commit intozotero:masterfrom
abes-esr:master

Conversation

@symac
Copy link
Copy Markdown
Contributor

@symac symac commented Apr 15, 2026

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.

@symac symac changed the title Dealing with electronic theses [PICA] Handling electronic theses on sudoc.fr Apr 15, 2026
Comment thread Library Catalog (PICA).js
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)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants