fabiobatalha / crossrefapi

A python library that implements the Crossref API.
BSD 2-Clause "Simplified" License
265 stars 44 forks source link

full-text.application filter error #45

Closed RichardScottOZ closed 2 years ago

RichardScottOZ commented 2 years ago

When I try

image

Same with an "_" as in some examples.

works.filter(has_full_text='true').query('zika').count()

is fine though

RichardScottOZ commented 2 years ago

Also, thanks very much for this, very nice!

Ankush-Chander commented 2 years ago

Hi @RichardScottOZ Thanks for trying out crossrefapi.

. and - are not supported in the argument hence we follow the notation where dot is replaced by double_underscore and dash is replaced by underscore.

Following snippet shopuld work for you as intended:

from crossref.restful import Works
work = Works()
for i in work.filter(full_text__application="text-mining"): # url: https://api.crossref.org/works?filter=full-text.application%3Atext-mining
    print(i)
RichardScottOZ commented 2 years ago

Thanks very much!

image