当前位置:网站首页>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 .
边栏推荐
- Pytest test framework II
- 等保备案是等保测评吗?两者是什么关系?
- Network security review office starts network security review on HowNet
- Reflection - class object function - get method (case)
- Difference between map and object
- Popupwindow touch event transparent transmission scheme
- Intermediary model -- collaboration among departments
- The Google File System (GFS) learning notes
- Pytest testing framework
- Microsoft Certification (dynamic 365) test
猜你喜欢

Image panr

Adding subscribers to a list using mailchimp's API V3

Mapstacks: data normalization and layered color layer loading

Microsoft Certification (dynamic 365) test
![[普通物理] 光栅衍射](/img/f3/965ff7cd3bb76b4f71b69b9d12ece3.png)
[普通物理] 光栅衍射

Difference between map and object

A/b test helps the growth of game business

Visitor model -- generation gap between young and middle-aged people

When querying the database with Gorm, reflect: reflect flag. mustBeAssignable using unaddressable value

Realization of truth table assignment by discrete mathematical programming
随机推荐
Interpreter mode -- formulas for dating
Pytest testing framework
Difference between map and object
The JS method parameter passed a number beginning with 0. A magical problem occurred and bothered me for a long time
Berkeley, MIT, Cambridge, deepmind and other industry leaders' online lectures: towards safe, reliable and controllable AI
Combination mode -- stock speculation has been cut into leeks? Come and try this investment strategy!
[multi thread performance tuning] multi thread lock optimization (Part 1): optimization method of synchronized synchronization lock
How Fiddler works
JUnit unit test
微信小程序自定义tabBar
yeb_ Back first day
Learn together and make progress together. Welcome to exchange
在Dialog中使用透明的【X】叉叉按钮图片
Appium introduction and environment installation
Learn to use a new technology quickly
Responsibility chain mode -- through interview
Reflect package
data link layer
Sequence stack version 1.0
A/B测试助力游戏业务增长