Léon

醒石

鸵鸟将头埋进土里,以此躲避危机。 我们也需要一个洞穴,暂时藏身,让心灵喘息。 欢迎来到我的洞穴。

Use Python scripts to batch download macOS aerial screen savers/wallpapers

Since the release of macOS Sonoma, Apple has provided new screensavers for Mac.

image

These screensavers are 4K aerial videos and can also be set as wallpapers. When switching back to the desktop from the screensaver, there is a dynamic transition animation. The effect is quite good, and there are many varieties.

Due to the 4K quality, they take up a lot of space, and these screensavers are not preloaded in the system. Aside from a few preset screensavers, others need to be clicked in the settings and wait for the program to download automatically, but the download speed is very slow, often only a few tens of kb.

image

According to the information I found, these screensavers are stored in the /Library/Application\ Support/com.apple.idleassetsd/Customer directory, while the metadata is stored in the entries.json file in the same directory.

So it became easier. I wrote a Python script that can directly download these screensavers in bulk.

Script Code#

Usage#

First, make sure you have the following two pip dependencies installed by executing in the terminal:

/usr/bin/pip3 install httpx tqdm

Create a screensaver.py file, copy the code content into screensaver.py, and execute sudo /usr/python3 screensaver.py in the terminal.

image

By default, it downloads in a single thread, but you can also use the batch parameter for bulk downloads:

sudo /usr/python3 screensaver.py --batch 5

image

After all wallpapers are downloaded, it takes up 66G, which is quite a lot of space.

image

P.S. After downloading, you may need to log out and log back in (or restart) for them to display correctly in settings.

P.P.S. If you need to delete the screensavers, simply clear the /Library/Application\ Support/com.apple.idleassetsd/Customer/4KSDR240FPS folder.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.