Skip to content

Commit

Permalink
fix(thesesfr): fixed status detection
Browse files Browse the repository at this point in the history
  • Loading branch information
oxypomme committed Jul 24, 2024
1 parent 824a972 commit 2c2b6cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion thesesfr/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = new Parser(function analyseEC(parsedUrl, ec) {
result.unitid = match[1];
result.publication_date = match[2];
result.institution_code = match[3];
switch (ec.status) {
switch (Number.parseInt(ec.status, 10)) {
case 200:
result.mime = 'PDF';
break;
Expand Down
20 changes: 10 additions & 10 deletions thesesfr/test/thesesfr.2024-07-18.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
out-publication_date;out-ppn;out-unitid;out-rtype;out-mime;out-publication_date;out-institution_code;in-url
;;2019LYSE2053;PHD_THESIS;MISC;2019;LYSE;https://theses.fr/api/v1/document/2019LYSE2053
;;2010AIX22039;PHD_THESIS;MISC;2010;AIX2;https://theses.fr/api/v1/document/2010AIX22039
;264066944;264066944;BIO;HTML;;;https://theses.fr/264066944
;264066944;264066944;BIO;HTML;;;https://theses.fr/api/v1/personnes/personne/264066944
;;s383095;ABS;HTML;;;https://theses.fr/s383095
;;s383095;ABS;HTML;;;https://theses.fr/api/v1/theses/these/s383095
2023;;2024BORD0122;ABS;HTML;2024;BORD;https://theses.fr/2024BORD0122
2023;;2024BORD0122;ABS;HTML;2024;BORD;https://theses.fr/api/v1/theses/these/2024BORD0122
;;;SEARCH;HTML;;;https://theses.fr/api/v1/theses/recherche/?q=test&debut=0&nombre=10&tri=pertinence
out-publication_date;out-ppn;out-unitid;out-rtype;out-mime;out-publication_date;out-institution_code;in-url;in-status
;;2019LYSE2053;PHD_THESIS;PDF;2019;LYSE;https://theses.fr/api/v1/document/2019LYSE2053;200
;;2010AIX22039;PHD_THESIS;HTML;2010;AIX2;https://theses.fr/api/v1/document/2010AIX22039;302
;264066944;264066944;BIO;HTML;;;https://theses.fr/264066944;200
;264066944;264066944;BIO;HTML;;;https://theses.fr/api/v1/personnes/personne/264066944;200
;;s383095;ABS;HTML;;;https://theses.fr/s383095;200
;;s383095;ABS;HTML;;;https://theses.fr/api/v1/theses/these/s383095;200
2023;;2024BORD0122;ABS;HTML;2024;BORD;https://theses.fr/2024BORD0122;200
2023;;2024BORD0122;ABS;HTML;2024;BORD;https://theses.fr/api/v1/theses/these/2024BORD0122;200
;;;SEARCH;HTML;;;https://theses.fr/api/v1/theses/recherche/?q=test&debut=0&nombre=10&tri=pertinence;200

0 comments on commit 2c2b6cb

Please sign in to comment.