Inventory #56
hentai-chan
started this conversation in
Ideas
Replies: 1 comment
-
Update for {
"name": "g",
"delta": 34905539
} This value is sometimes zero, and sometimes it's not. There's also this code snippet that I could trace back to this endpoint: e.show = function() {
if (this.options.show_popunders) {
var t = this.get_state().lock_until;
if (!(t > o.l() && t <= o.l() + 864e5)) {
this.update_lock(14e3);
var e = this;
Object(g.a)({
url: "/api/inventory",
method: "GET"
}).then((function(t) {
try {
var n = JSON.parse(t.response)
} catch (t) {
return
}
e.on_inventory(n)
}
)).execute()
}
}
} I think key to understanding what this invocation does is to be sought in e.on_inventory = function(t) {
t.delta > 0 ? this.update_lock(t.delta) : (this.time_until_next = t.delta,
this.add_popunder(t.name))
} So >>> from datetime import datetime as dt, timezone
>>> print(dt.fromtimestamp(34_905_539, tz=timezone.utc))
1971-02-08 23:58:59+00:00
>>> print(f"hours={34_905_539 / 3_600}")
hours=9695.983055555556
>>> print(f"years={34_905_539 / (3_600 * 24 * 365.25)}")
years=1.1060897850280123 Still not really sure what to make out of it. There're many one-letter functions whose purpose I have trouble to grasp, too. My best guess is that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Inventory
During research I stumbled upon this endpoint:
https://nhentai.net/api/inventory
. I can't make much sense of it now, but maybe someone else will be able to draw more conclusions from it based on this script.Response
It's not awfully important to understand what this means but it may turn out to be a gateway to more interesting features.
Beta Was this translation helpful? Give feedback.
All reactions