Xdynix

Results 37 comments of Xdynix

Using the mixin is just simply set the access policy to `permission_classes`. You can check the [source code](https://github.com/rsinger86/drf-access-policy/blob/8c4630432aafd70ff3fecb70d0606dc30426dbf8/rest_access_policy/access_view_set_mixin.py#L24).

> > 我都快用了1年了,经常用的话好像就不会过期 我其实想知道 token 多长时间会过期,过期后应如何处理 > > 过期的话可以通过refresh_token重新获取,但是在pixivpy里没有方法,需要自己写,可以看一下[https://github.com/txperl/PixivBiu](PixivBiu)的实现 `api.auth(refresh_token=api.refresh_token)`

只使用aapi很难绕过此限制,除非能找到服务器程序的漏洞。你只能考虑使用其他平台的API了,如模拟网页浏览器的请求。

> Due to #158 reason, password login no longer exist. Please use api.auth(refresh_token=REFRESH_TOKEN) instead > > To get refresh_token, see [@ZipFile Pixiv OAuth Flow](https://gist.github.com/ZipFile/c9ebedb224406f4f11845ab700124362) or [OAuth with Selenium/ChromeDriver](https://gist.github.com/upbit/6edda27cb1644e94183291109b8a5fde) Ref: top...

I have no experience using the script so cannot comment on it. But for `api.auth(refresh_token=refresh_token)` it keeps returning the same refresh token to me.

I ... had never retrieved the refresh tokens... The token I'm using is a very old one, saved before #158 happened. :stuck_out_tongue: I will probably go with the Selenium method...

My monkey patch for resolving the same issue when loading local font on Windows: ```python pisaFileObject.getNamedFile = lambda self: self.uri ``` And make sure they're executed before `pisa.CreatePDF`.

One nice thing about PDM is that if a command is not recognized as a built-in, it is treated as `pdm run`. Thus, `pdm foobar` would be shorthand for `pdm...

This is a Django behavior, not Django Ninja one. When multiple URL patterns match the request URL, it will always use the first one. So the correct way of defining...

`pixivpy` is simply returning what Pixiv server gave us, so we have nothing to do with the response shape. My snippet of downloading illustrations is very similar to yours: ```python...