当前位置:网站首页>PIXIV Gizmo
PIXIV Gizmo
2022-06-24 21:12:00 【The smell of tobacco】
Preface
Recently I saw a big man , Open source a small blog plug-in , Address . Can be pixiv The daily list of the website is put in the blog sidebar . It looks cool . So I also introduced it into my blog . I would like to express my thanks to the boss .
But in use , It is often encountered that the access is very slow , After checking, I found , The big guy's server is set up in Korea , No wonder access is slow , It's all international bandwidth .
therefore , I just built one in Beijing , If necessary, it can be introduced by itself . The effect can be Home page see . Address : https://fun.hujingnb.com/pixiv/i
Use
I'm using WordPress, So WordPress For example , Please handle other situations by yourself . The click effect of the current image is to open the original image .
Add sidebar HTML Control , Content (iframe Please modify ):
<iframe src="https://fun.hujingnb.com/pixiv/i" frameborder="0" style="width:300px; height:400px;" ></iframe>
in addition , I added a few requested GET Parameters , It is used for customization of small partners in need .
interval: Page rotation duration ( millisecond ). Default5000bg: Background color , Defaulttransparentw: Image width . Default300- Because many of the pictures on the daily list exceed
1MB, Therefore, the image is compressed , Can improve access speed . - Optional value :
100, 200, 300, 400, 500.
- Because many of the pictures on the daily list exceed
limit: Ranking range of rotation training . Default1,501,50Show rankings for 1-50 Pictures of the- The biggest ranking
100, For the time being100It should be enough , So we only took the Japanese list top 100
principle
At the beginning , I was thinking about the project down Come down , Just configure it to run , however , After reading the source code , I find that I can't use many functions of others , I just need a crawler and a presentation page . I just wrote a .
The implementation is very simple , Here is a brief introduction , No more open source , There are only a few lines .
A presentation page , from oss Read pictures from the fixed path of the . Like ranking 1 Of , Path is : pixiv/1.jpg.
A script that executes regularly every day , Download and overwrite the latest pictures oss File contents of . To save money , When the download is complete ecs release . Specific to see Alibaba cloud schedules tasks and automatically releases them . meanwhile , Because the page uses cdn Read the picture , So after downloading , To refresh the next cdn cache .
be without , That's all . Of course , Now there are still some problems , such as :
- If the scheduled script is executed , The daily leaderboard has not been refreshed , Lack of retry mechanism
- The page can only read pictures url, Unable to read more information , Lack of data communication
- If there is no picture of a ranking on that day , The page doesn't know , There will still be demonstrations . ( Because it is a file overwrite , You can still read old files )
- wait
However, the current requirements are not high , These problems are tolerable .
边栏推荐
- Comprehensive comparison of the most popular packet capturing tools in the whole network
- Is the waiting insurance record a waiting insurance evaluation? What is the relationship between the two?
- DAPP system customization of full chain hash game (scheme design)
- Mr. Hu Bo, CIO of weiduomei, a scientific innovator: digitalization is a bloodless revolution, and the correct answer lies in the field of business
- Basic concepts and definitions of Graphs
- Variable setting in postman
- JMeter parameterization
- 在Dialog中使用透明的【X】叉叉按钮图片
- Subnet partition operation
- Summary of idea practical skills: how to rename a project or module to completely solve all the problems you encounter that do not work. It is suggested that the five-star collection be your daughter
猜你喜欢

A/B测试助力游戏业务增长

(to be optimized and modified) vivado DDR4 SDRAM (MIG) (2.2) IP core learning record
浅谈MySql update会锁定哪些范围的数据

伯克利、MIT、剑桥、DeepMind等业内大佬线上讲座:迈向安全可靠可控的AI

Bean lifecycle flowchart

Static routing job
![Use the transparent [x] cross button image in the dialog](/img/0c/2be7bc7f20b581a2cc745d9cabe9ff.jpg)
Use the transparent [x] cross button image in the dialog

JMeter response assertion

Several common command operations in win system

The four stages of cloud computing development have finally been clarified
随机推荐
Leetcode(146)——LRU 缓存
Second understanding permutation and combination
Responsibility chain mode -- through interview
The difference between RPC and restful
NPM download speed is slow
Summary of message protocol problems
Leetcode (135) - distribute candy
Basic concepts and definitions of Graphs
[performance tuning basics] performance tuning strategy
After a few years in the testing industry, do you still know a little?
Why do we always "give up halfway"?
Hongxiang Yunteng is compatible with dragon lizard operating system, and the product runs stably
Microsoft Certification (dynamic 365) test
Berkeley, MIT, Cambridge, deepmind and other industry leaders' online lectures: towards safe, reliable and controllable AI
Am, FM, PM modulation technology
yeb_ Back first day
Smooth live broadcast | analysis of key technologies for live broadcast pain points
Open programmable infrastructure (OPI) project, redefining dpu/ipu
Markdown use
Enjoy yuan mode -- a large number of flying dragons