Skip to content

Conversation

@MarkBlankestijn
Copy link

@MarkBlankestijn MarkBlankestijn commented Sep 20, 2016

Due to upcoming move to https-only by the NCBI, the esearch and efetch URLs require updating to https.

@Roadirsh
Copy link

Aaaaah maybe this will fix this issue: #9

@MarkBlankestijn MarkBlankestijn deleted the patch-1 branch October 25, 2016 07:46
@MarkBlankestijn MarkBlankestijn restored the patch-1 branch October 25, 2016 07:49
@budflanksteak
Copy link

Mark,

I made the changes to lines 42 and 43 but I am now throwing a new error at line 66: $this->count = (int)$xml->Count.

Is there another change needed to ensure that HTTPS query is being sent?

Thanks

@MarkBlankestijn
Copy link
Author

I have no other issues with the script. What is the exact error?

@budflanksteak
Copy link

Notice: Trying to get property of non-object in

I'm assuming that means that it is not receiving properly formed XML. Obviously it's strange since we are both running identical code. The formed search string works normally in a browser. Which database are you accessing? Could that be the difference? I am hitting 'pubmed' specifically and only doing author queries.

On Nov 9, 2016, at 3:24 AM, Mark notifications@github.com wrote:

I have no other issues with the script. What is the exact error?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@MarkBlankestijn
Copy link
Author

It could be due to the script wrapping your query in quotes by default, thereby returning 0 results. Have you set exact_match to false?

For example:

$search_term = 'Someone[au]';
$PubMedAPI = new PubMedAPI();
$PubMedAPI->exact_match = false;
$results = $PubMedAPI->query($search_term);

@budflanksteak
Copy link

I have public $exact_match = false
In the settings in the PubMedAPI file.

On Nov 9, 2016, at 11:05 AM, Mark notifications@github.com wrote:

It could be due to the script wrapping your query in quotes by default, thereby returning 0 results. Have you set exact_match to false?

For example:

$search_term = 'Someone[au]';
$PubMedAPI = new PubMedAPI();
$PubMedAPI->exact_match = false;
$results = $PubMedAPI->query($search_term);


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@shajamansoor
Copy link

@budflanksteak By default author search by someone[au]. Then how to search by title and year?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants