Skip to content

Commit

Permalink
Update DEPATISnet.js
Browse files Browse the repository at this point in the history
  • Loading branch information
zuphilip committed Dec 7, 2019
1 parent 9655d46 commit 7ace0b3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions DEPATISnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2014-03-12 04:43:57"
"lastUpdated": "2019-12-07 18:38:46"
}

/*
Expand Down Expand Up @@ -115,7 +115,7 @@ function scrape(doc, url) {

var ipcs = [];

var rows = ZU.xpath(doc, '//table[@class="ergebnis"]/tbody/tr');
var rows = ZU.xpath(doc, '//table[@class="tab_detail"]/tbody/tr');

for (var i=0, n=rows.length; i<n; i++) {
var columns = ZU.xpath(rows[i], './td');
Expand Down Expand Up @@ -207,7 +207,9 @@ function scrape(doc, url) {
});

var pages = ZU.xpathText(doc, '//table[@class="ergebnis"]/caption[1]');
pages = pages.match(/(Seiten|Pages):\s*([0-9]+)/)[2];
if (pages) {
pages = pages.match(/(Seiten|Pages):\s*([0-9]+)/)[2];
}

if (pages > 0) {
var pdfurl = "https://register.dpma.de/pdfschrift/"+pn+".pdf?dpi=300";
Expand Down Expand Up @@ -386,4 +388,4 @@ var testCases = [
]
}
]
/** END TEST CASES **/
/** END TEST CASES **/

0 comments on commit 7ace0b3

Please sign in to comment.