Skip to content

Commit

Permalink
🐛 bug: fix PDF downloads from eLitigation
Browse files Browse the repository at this point in the history
  • Loading branch information
hueyy committed Oct 10, 2021
1 parent 0976252 commit 600fce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clerkent",
"version": "2.8.2",
"version": "2.8.3",
"private": true,
"description": "quick search for international caselaw and legislation",
"repository": "https://github.com/lacuna-technologies/clerkent.git",
Expand Down
6 changes: 3 additions & 3 deletions src/utils/scraper/SG/eLitigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const parseCaseResults = (data: string): Law.Case[] => {
const card = $(`> .card-body > .row`, element)
const name = $(`a.gd-card-title,a.gd-heardertext`, card).text().trim()
const link = $(`a.gd-card-title,a.gd-heardertext`, card).attr(`href`)
const pdf = $(`img.card-icon`, card).parent().attr(`href`) || `${link.replace(`SUPCT/`, ``)}/pdf`
const pdf = $(`img.card-icon`, card).parent().attr(`href`) || `${link.replace(`SUPCT/`, ``).replace(`/s/`, `/gd/`)}/pdf`
const citation = $(`span.gd-addinfo-text`, card).first().text().trim().replace(`|`, ``)

const summaryLink = link
Expand Down Expand Up @@ -50,7 +50,7 @@ const getCaseByCitation = async (citation: string): Promise<Law.Case[]> => {
searchPhrase: citation,
sortAscending: `False`,
sortBy: `Score`,
verbose: false,
verbose: `False`,
yearOfDecision: `All`,
},
})
Expand All @@ -68,7 +68,7 @@ const getCaseByName = async (caseName: string): Promise<Law.Case[]> => {
searchPhrase: caseName,
sortAscending: `False`,
sortBy: `Score`,
verbose: false,
verbose: `False`,
yearOfDecision: `All`,
},
})
Expand Down

0 comments on commit 600fce5

Please sign in to comment.