Closed CompetitiveLin closed 1 year ago
I believe that it is caused by the slow response from leetcode.cn, which makes GitHub image proxy timeout.
I'm not sure what's the threshold of the timeout, maybe around 3 or 4 seconds because it always needs about 4.5 seconds to show up without any cache. (I use chrome dev-tool to measure it.)
My suggestion is to use GitHub Actions as a cron job to generate it. You can use the package leetcode-card
or simply use curl to download the SVG and commit it to the repository.
I believe that it is caused by the slow response from leetcode.cn, which makes GitHub image proxy timeout.
I'm not sure what's the threshold of the timeout, maybe around 3 or 4 seconds because it always needs about 4.5 seconds to show up without any cache. (I use chrome dev-tool to measure it.)
My suggestion is to use GitHub Actions as a cron job to generate it. You can use the package
leetcode-card
or simply use curl to download the SVG and commit it to the repository.
You're using like a crawler to get those data and make a heatmap from leetcode.cn/graphql, are you?
You're using like a crawler to get those data and make a heatmap from leetcode.cn/graphql, are you?
Yes, the data are from the graphql endpoint.
You can find the details (of heat-map) at here.
Actually I'm not sure why LeetCode CN uses /graphql/noj-go/
instead of /graphql
. (What does the "noj" means? N... Online Judge?)
haha no idea
BTW, it works now.
![Leetcode Stats](https://leetcard.jacoblin.cool/CompetitiveLin?theme=light&ext=heatmap&site=cn)
shows nothing.Just like this below:
But https://leetcard.jacoblin.cool/CompetitiveLin?theme=light&ext=heatmap&site=cn works.
How to fix it?