https://github.com/maxam2017/daily-ptt-login
wip 👷
https://github.com/maxam2017/daily-ptt-login
Last synced: over 1 year ago
JSON representation
wip 👷
- Host: GitHub
- URL: https://github.com/maxam2017/daily-ptt-login
- Owner: maxam2017
- Created: 2023-01-30T13:20:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-30T13:23:03.000Z (over 3 years ago)
- Last Synced: 2025-02-15T20:41:42.305Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Daily PTT Login
## Try 1: web socket
> see [3fea641](https://github.com/maxam2017/daily-ptt-login/commit/3fea6415c1c655c505e245dd5a401a303fb1e957)
Web sockets are the most natural way to use PPT, and **PyPTT** is the best and most comprehensive third-party library for this purpose.
I decided to use the Python-supporting Vercel serverless function as a result. and failed.
Because web sockets are consistent connections, Vercel serverless function does not support them. I therefore choose a different approach.
## Try 2: headless / headed browser
> see [f7f6a15](https://github.com/maxam2017/daily-ptt-login/commit/f7f6a15b692b16ea1f1f5a8719e555c7149f38ef)
Another option is to use Chromium (/w Playwright or Puppeteer), although at the moment serverless functions can only execute for 10 seconds on the free plan. We finally get a break.
## Try 3: self hosted
> TBC.
This, I believe, is the only option. I hope I can come up with a better solution 🌟