Wrong Output with object=f, topic=s and Date Range

Q

Why am I getting the output with json.php?object=f&topic=s&mode=last&timefirst=2022-01-01?

✍: FYIcenter.com

A

There is seems to be a code bug in Library Genesis API. If you use "object=f", "topic=l|c|m|a|s|f|r", "mode=last" and "timefirst={date}" parameters, it ignores the "topic" parameter.

For example, if you retrieve the first file after year 2022 in topic of "standards", you will get a file in topic of "fiction":

fyicenter$ curl 'https://libgen.lc/json.php?object=f&topic=s&mode=last&timefirst=2022-01-01&limit2=1' \
  | python -m json.tool 

{
  "97771626": {
    "archive_dop_files_flag": "",
    "archive_files_count": "0",
    "archive_files_pic_count": "0",
    "bookmarked": "",
    "broken": "",
    "c2c": "",
    "cleaned": "",
    "color": "",
    "comics_id": "0",
    "commentary": "",
    "cover_exists": "1",
    "cover_info": "",
    "dpi": "",
    "editable": "1",
    "editions": {
        "97492394": {
            "e_id": "141766914",
            "time_added": "2022-05-28 08:15:31",
            "time_last_modified": "2022-05-28 08:15:31"
        }
    },
    "extension": "fb2",
    "fiction_id": "3489087",
    "fiction_rus_id": "0",
    "file_create_date": "2000-01-01 05:00:00",
    "filesize": "1649065",
    "generic": "",
    "libgen_id": "0",
    "libgen_topic": "f",
    "locator": "9789663650814---e142831dedf02ed241484511f9fffad0.fb2",
    "magz_id": "0",
    "md5": "e142831dedf02ed241484511f9fffad0",
    "ocr": "",
    "orientation": "",
    "pages": "0",
    "paginated": "",
    "releaser": "",
    "scan_content": "",
    "scan_quality": "",
    "scan_size": "",
    "scan_type": "",
    "scanned": "",
    "scimag_archive_path": "",
    "scimag_id": "0",
    "standarts_id": "0",
    "time_added": "2022-05-28 08:15:31",
    "time_last_modified": "2022-06-12 01:46:14",
    "vector": "",
    "visible": ""
  }
}

If you use "object=f", "topic=l|c|m|a|s|f|r", and "id_start={id}" parameters, the "topic" parameter works nicely. For example:

fyicenter$ curl 'https://libgen.lc/json.php?object=f&topic=s&id_start=100000&limit2=1' \
  | python -m json.tool 

{
    "3923583": {
        "archive_dop_files_flag": "",
        "archive_files_count": "0",
        "archive_files_pic_count": "0",
        "bookmarked": "",
        "broken": "",
        "c2c": "",
        "cleaned": "",
        "color": "",
        "comics_id": "0",
        "commentary": "",
        "cover_exists": "0",
        "cover_info": "",
        "dpi": "",
        "editable": "1",
        "editions": {
            "1409255": {
                "e_id": "2630906",
                "time_added": "2020-12-17 04:21:04",
                "time_last_modified": "2020-12-17 04:21:04"
            }
        },
        "extension": "pdf",
        "fiction_id": "0",
        "fiction_rus_id": "0",
        "file_create_date": "2000-01-01 05:00:00",
        "filesize": "15759807",
        "generic": "",
        "libgen_id": "0",
        "libgen_topic": "s",
        "locator": "T:\\CAT_OSN22\\2\\1\\4293790619.pdf",
        "magz_id": "0",
        "md5": "b908d0fa56ddb3f1f783a209716513a1",
        "ocr": "",
        "orientation": "",
        "pages": "0",
        "paginated": "",
        "releaser": "",
        "scan_content": "",
        "scan_quality": "",
        "scan_size": "",
        "scan_type": "",
        "scanned": "",
        "scimag_archive_path": "",
        "scimag_id": "0",
        "standarts_id": "100001",
        "time_added": "2015-02-05 04:56:59",
        "time_last_modified": "2015-02-05 04:56:59",
        "vector": "",
        "visible": ""
    }
}

 

get.php - File Download API

json.php API - Get "files" by MD5 Hash

Library Genesis API

⇑⇑ LibGen (Library Genesis) - Frequently Asked Questions

2022-10-07, 558🔥, 0💬