habanero icon indicating copy to clipboard operation
habanero copied to clipboard

Library returns wrong values

Open wisentini opened this issue 1 year ago • 3 comments

Environment

Python   3.8.18
habanero 1.2.3

Problem

When I make a request to https://api.crossref.org/journals/2448-1904 via my web browser, the subjects field is:

"subjects": [
    {
        "ASJC": 2505,
        "name": "Materials Chemistry"
    },
    {
        "ASJC": 2002,
        "name": "Economics and Econometrics"
    },
    {
        "ASJC": 2214,
        "name": "Media Technology"
    },
    {
        "ASJC": 1107,
        "name": "Forestry"
    }
]

But when I make the same request via code:

crossref = Crossref(
    mailto=config['crossref']['mailto'],
    ua_string=config['crossref']['user_agent']
)

response = crossref.journals(ids='2448-1904')

print(json.dumps(response['message']['subjects'], indent=4))

The result is:

[
    {
        "ASJC": 2700,
        "name": "General Medicine"
    }
]

Why is that?

wisentini avatar Feb 05 '24 17:02 wisentini