(01-19-2021, 02:26 AM)Troen Wrote:Yeah, this is the way I originally started going about this! It works great for most posts, but here's what I run into. Old post timestamps look like this--(01-19-2021, 01:33 AM)Maglubiyet Wrote: The biggest outstanding issue with the script right now is related to the way it determines if users have completed Weekly Training. The timestamps on the forums were giving me fits, so the way it's implemented is that it works backwards until it finds the most recent training post on Sunday and gives credit to all of the people that completed training since then. If no one did training on a Sunday, I have no idea what will happen.
Can you parse the forum dates? If so, can you check something like
(I don't actually know python)Code:lastWeek = datetime.now() - timedelta(days=7)
for each player:
get most recent post
if post.time < lastWeek:
print that they didn't do it or whatever
That's obviously not perfect, but maybe a good starting heuristic?
Code:
<span class="post_date"><i class="fa fa-clock-o"></i> Tuesday, July 21st, 2020, 10:18 am</span>
Code:
<span class="post_date"><i class="fa fa-clock-o"></i> <span title="Tuesday, January 19th, 2021, 09:06 am">5 minutes ago</span>
![[Image: Maglubiyet.gif]](https://sig.grumpybumpers.com/host/Maglubiyet.gif)









