b3yc0d3 / rule34Py

python api wrapper for rule34.xxx rest api
https://pypi.org/project/rule34Py/
GNU General Public License v3.0
24 stars 6 forks source link

PostComment.creation returns incorrect timestamp #11

Closed sjaak31367 closed 12 months ago

sjaak31367 commented 1 year ago

Greetings!

It seems that PostComment.creation is the time when the comment was obtained/fetched by get_comments() rather than the time the comment was created/posted. (though the time is slightly offset, presumably because it uses UTC time, and I am on UTC +2.)

code to reproduce the bug: Python: 3.10.2

from rule34Py import rule34Py
r34Py = rule34Py()
print(r34Py.version)  # 1.4.10
comments = r34Py.get_comments(1)
for comment in comments:
  print(f"{comment.creation}\t{comment.body}")

output:

1.4.10
2023-06-21 19:30    I feel like I [...]
2023-06-21 19:30    Dropping by [...]
2023-06-21 19:30    Welcome to the first [...]
[...]
b3yc0d3 commented 1 year ago

The problem is, that's what the api returns That's what i get from the rule34 API

<?xml version="1.0" encoding="UTF-8"?>
<comments type="array">
    <comment created_at="2023-06-21 19:43" post_id="1" body="I feel like I [...]" creator="Bree[...]" id="4194293" creator_id="508640"/>
    <comment created_at="2023-06-21 19:43" post_id="1" body="Dropping by too [...]" id="6189108" creator_id="903202"/>
</comments>
sjaak31367 commented 1 year ago

I was digging too and was about to say the same. I'll try and see if I can find a "submit issue" form at rule34 or forum / Discord.

But thank you for the quick response! :D Have a great day!

b3yc0d3 commented 1 year ago

No problem, i'll look too how to submit issues to the admins

Thanks, have a great day too

b3yc0d3 commented 1 year ago

Seems like only rule34s api has that problem. Gelbooru, they run the same backend as far as i know, doesn't has that problem.

sjaak31367 commented 1 year ago

After reading the Gordian knot of FAQ's and pins, I have posted the issue to a moderator via the site's mail. """Ask your question/request, wait patiently don't expect a live response, and state roughly what it is about. No appeals, site mail or staff@booru.org

Not a channel for reporting non urgent site matters, discussing site policy etc. which is best done using the site report function/Site mail, API questions go to email.""" as per #user_support on Discord however if the issue is not on all boorus, it'd be a rule34 issue, not generalized.

I'll await a reply, and hopefully it'll get added to the todo list on their end (or the ball kicked closer towards the goal).

sjaak31367 commented 1 year ago

It seems Gelbooru itself runs on Gelbooru Beta 0.2.5 whereas rule34, safebooru, realbooru, xbooru, hypnohub, and probably more run Gelbooru Beta 0.2.0 So it might just be a case of running not-latest-version on the backend.

b3yc0d3 commented 1 year ago

Lets hope that they will upgrade soon to the newer 0.2.5

sjaak31367 commented 1 year ago

Given you've closed the issue but the bug still remains (on their end), I presume you've heard back and got a message along the lines of "Updating the back-end would be too much work at this point" or "Will be fixed next update, but when this rolls out is still uncertain"? Or simply closing due to inactivity/no response?

b3yc0d3 commented 1 year ago

Haven't got any response yet i re-open the issue (my fault that i closed it, probably better to leave it open)

b3yc0d3 commented 12 months ago

I'm going to close this issue for good. Seems like nothing gonna change on their api end.