Skip to content

Commit

Permalink
Use cached_browser to talk to dbpedia
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jul 24, 2024
1 parent 7504dcc commit 73a16fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ on:
pull_request:
jobs:
build:
runs-on: macos-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- name: freebsd
version: '13.0'
version: '13.3'
pkginstall: pkg install -y p5-LWP-UserAgent-Cached p5-CHI p5-autodie p5-Date-Manip p5-Data-Section p5-Sort-Key-DateTime p5-GIS-Distance p5-Marpa p5-Lingua-EN-Numbers-Ordinate p5-JSON p5-Net-OAuth p5-LWP-Protocol-https p5-CPAN-DistnameInfo p5-Array-Iterator p5-HTML-Parser
- name: openbsd
version: '7.1'
version: '7.5'
pkginstall: pkg_add p5-LWP-Protocol-https

steps:
Expand Down
6 changes: 3 additions & 3 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ BEGIN {
foreach my $module(@modules) {
eval "use $module";
if($@) {
# Install module dependancies
# Install module dependencies
if($module =~ /(.+)\s/) {
# Specific version not satisfied
push @needfull, $1;
Expand Down Expand Up @@ -6914,7 +6914,7 @@ sub print_person
}
} elsif($type eq 'Newspaper') {
# FIXME: duplicate code with one event
# This is a non-standard thing that FMP has evented :-(
# This is a non-standard thing that FMP has invented :-(
# FIXME: handle more than one newspaper
my $s;
if($phrase->length()) {
Expand Down Expand Up @@ -14841,7 +14841,7 @@ sub dbpedia

my $url = "https://lookup.dbpedia.org/api/search?query=$firstname%20$surname";
print "$url\n" if($opts{'v'});
if(($firstname ne '?') && (my $resp = $browser->get($url))) {
if(($firstname ne '?') && (my $resp = $cached_browser->get($url))) {
if($resp->is_success()) {
if(my $arrayofresults = XML::Hash->new()->fromXMLStringtoHash($resp->decoded_content())->{'ArrayOfResults'}) {
RESULT: foreach my $result(@{$arrayofresults->{'Result'}}) {
Expand Down

0 comments on commit 73a16fa

Please sign in to comment.