Closed morefreeze closed 7 years ago
同问,17wo 的请求也带时间戳
{{ timestamp() }}
@binux 感谢,其实我想问的这个函数支持列表哪里有?比如我还要对时间作些操作
@binux 添加了这个模板为什么创建的时候要求填写 timestamp?
@legendtang 这是一个 bug
@binux failed at 2/2 request, error:AttributeError("'unicode' object has no attribute '__call__'",), http://www.acfun.tv/webapi/record/actions/signin?channel=0&date={{ timestamp() }}
我遇到了这个错误,这个能正常使用吗?
@morefreeze 为什么关了 issue?你确定可以正常使用?
可以,得到的是一个带小数点的数,虽然我想要个int 但配置jinja的filter已经够了 你这个问题没遇到过,更新到最新代码了吗
BTW, A站的签到如果不传timestamp是签当天的,传的话可能是补签,目前不填参数已经满足需求了
@morefreeze 这样 int 拿到的是以秒为单位的 timestamp,而不能拿到 JS 网页中的毫秒级的,这里 filter 似乎不能做乘法?
比如现在A站的签到变到类似这样的 http://www.acfun.tv/webapi/record/actions/signin?channel=0&date=1481267468594
后面是个签到的时间戳,给哪一天的时间戳就算哪天,所以这个必须给,但每天都会变,有这样的变量吗