当前位置:网站首页>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 .
边栏推荐
- After idea installs these plug-ins, the code can be written to heaven. My little sister also has to arrange it
- Dx12 engine development course progress - where does this course go
- Limit summary (under update)
- 刚购买了一个MYSQL数据库,提示已有实例,控制台登录实例要提供数据库账号,我如何知道数据库账号。
- Design of routing service for multi Activity Architecture Design
- What are the problems with traditional IO? Why is zero copy introduced?
- Common data model (updating)
- (to be optimized and modified) vivado DDR4 SDRAM (MIG) (2.2) IP core learning record
- Pyaudio audio recording
- Where is 5g really powerful? What is the difference with 4G?
猜你喜欢

Realization of truth table assignment by discrete mathematical programming
[email protected] -Perfmon metric collector listener steps"/>JMeter installation plug-in, adding [email protected] -Perfmon metric collector listener steps

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

Limit summary (under update)

Nifi quick installation (stand-alone / cluster)

Shrimp skin test surface treated

How Fiddler works

How to apply agile development ideas to other work

VMware virtual machine setting static IP

Builder mode -- Master asked me to refine pills
随机推荐
Mapstacks: data normalization and layered color layer loading
Appium introduction and environment installation
maptalks:数据归一化处理与分层设色图层加载
database/sql
Learn to use a new technology quickly
Leetcode(455)——分发饼干
Leetcode(135)——分发糖果
Enjoy yuan mode -- a large number of flying dragons
Image panr
Hongxiang Yunteng is compatible with dragon lizard operating system, and the product runs stably
Leetcode(146)——LRU 缓存
Background operation retry gave up; KeeperErrorCode = ConnectionLoss
Background of master data construction
Can the OPDS SQL component pass process parameters to the next component through context
Limit summary (under update)
yeb_ Back first day
Sequential stack traversal binary tree
Web automation: web control interaction / multi window processing / Web page frame
JMeter response assertion
Several common command operations in win system