Browse files

Due to the space in 'Chemical blogspace' the curl command in search_p…

…ubmed_doi always failed. Now, thanks to the magic of CGI::escape, this is not a problem. PMIDs will now be retrieved...this should improve the metadata.

git-svn-id: d3c5a50b-8e31-0410-8099-a759d7a8ce2e
  • Loading branch information...
1 parent aad19a7 commit 8fa9666e8f96e32a708f1145f6d0b5fafaecfbbc baoilleach committed Jul 5, 2007
Showing with 2 additions and 1 deletion.
  1. +2 −1
@@ -10,6 +10,7 @@ package helper;
use lib (".");
use strict;
use DBI;
+use CGI;
use config qw(%config urlencode log log_error do_sleep urldecode $DEBUG parse_post_xml url_breakdown trim);
use XML::Simple;
@@ -189,7 +190,7 @@ sub download_url {
sub search_pubmed {
my $text = urlencode("\"".$_[0]."\"");
- my $search_url = sprintf("", $config{"name"}, $config{"email"}, $text);
+ my $search_url = sprintf("", CGI::escape($config{"name"}), $config{"email"}, $text);
my $agent = $config{"user_agent"};
my $results = `curl -s -L -m 30 -A "$agent" '$search_url'`;

0 comments on commit 8fa9666

Please sign in to comment.