Blog

Douban on the desktop: a Mac and Windows app

Popular sites · · 7 min read

Douban has no official Mac or Windows client. Its own pages offer only a QR code for the phone app, so on a computer it is the website at douban.com, plus an iPhone app that an Apple silicon Mac can also run. A Pake app puts the website in a window of its own on Mac and Windows, with movie.douban.com, book.douban.com and the rest staying inside it. You can also keep using Douban in your browser.

What Douban offers on a computer

WhereWhat it is for
Webwww.douban.comThe whole community: groups, notes, the home timeline
Movies, books, musicSub-sites such as movie.douban.com, book.douban.com and music.douban.comRatings, reviews, lists and marking what you have seen or read
Phone appApp Store listing and the Android appThe same community on a phone
Apple silicon MacThe same iPhone app, run on a MacThe phone app, not a Mac version

Douban's about page links to a client download whose box shows a QR code with links for iPhone and Android, and the mobile page offers a QR code to scan. Neither mentions a Mac or Windows version, which matches what the App Store shows.

The App Store listing for 豆瓣, from Beijing Douwang Technology Company Limited, is an iPhone and iPad app. Its compatibility section also lists a Mac with an Apple M1 or later chip on macOS 12.0 or later, so it installs on an Apple silicon Mac as the phone app, not as something designed for a desktop. 豆瓣阅读, Douban's reading app, is a separate listing from a different company, so it is not what this article covers.

On an Intel Mac or a Windows PC that listing does not apply, so the website is what is left, and a Pake app is one way to keep it out of your browser tabs. Pake supports Intel Macs on macOS 14 or later.

What a Pake window is

A Pake app is a small program that opens one address in the system web view: WKWebView on a Mac, Microsoft Edge WebView2 on Windows. Nothing about Douban is changed. The site sees a browser engine of the same family as Safari or Edge, and the app keeps its cookies and site data apart from your browser's.

Most of what follows comes from that. A sign-in lasts because the app keeps its cookies between launches, and a link to another site opens in your regular browser, because Pake decides by address which links stay in the window. Pake cannot fix anything on Douban's side, such as a feature that exists only in the phone app.

Why Douban's sub-sites matter

Douban is not one address. The home page and the groups are on www.douban.com, while movies, books and music each have their own host under douban.com, and when you click from one to another, the app has to decide whether the new page opens in the window or in your browser.

By default Pake compares the clicked link with the address of the page you are on. A link stays inside the window when its host is the same, or when both hosts share the same root domain, which is the last two parts of the host name for an ordinary domain. For an app made from https://www.douban.com/, a link to movie.douban.com or book.douban.com therefore stays in the window, because the root domain is douban.com for both. A link to a site on some other domain opens in your browser.

If you only ever use one sub-site, you can narrow the rule with a regular expression: links whose full address matches it stay in the app, and all others open in the browser. In Pake for Windows this is Internal URL regex under Advanced, while Pake for Mac shows that field only for an app that already has a pattern. In the CLI documentation the same option is --internal-url-regex, and when a pattern is set it takes precedence over the default domain matching.

Make it in the Pake desktop app

Douban is not in the gallery of ready-made apps, so it has no tile with tuned settings. The app does know the address. The Pake site's supported-sites list has douban.com under Social, which means a pasted Douban address gets its name and icon.

On the Create tab, paste https://www.douban.com/ into Paste a web address or search the apps below to start. Adjust the Size (Window size on Windows) if you like, then click Create App (Create app on Windows). Every option is described in Create an app.

Sign in and stay signed in

Sign in with whichever method Douban's page offers. The page decides what it shows and can change it, and Pake is the window, not part of the sign-in, so this article does not list the methods.

To be remembered, the app has to keep its cookies. Incognito starts every session clean, with no sign-ins or site data, and it is off by default, so leave it off. Pake for Mac only shows that switch for an app that already has it on. After signing in, quit the app normally and open it again to confirm you are still signed in, rather than force-quitting it.

On a Mac, passkeys and Touch ID sign-in are not available in Pake apps, according to the Pake CLI FAQ. If an account is set up that way, use a password. On Windows, if a sign-in pop-up does nothing, turn on Open new windows in the app under Behavior, which keeps the pop-up as its own window inside the app. On Mac and Linux, sign-in pop-ups already open in the app's own window, except Sign in with Apple, which keeps its pop-up.

What can go wrong

If a page shows a login wall or a browser warning that the normal site does not, compare the user agent first. The default is the Safari user agent on a Mac and the Chrome user agent on Windows, and you can change it under Advanced in User agent. The user agent guide explains when that helps.

If a link opens in your browser when you wanted it in the app, it points outside douban.com, or you set an Internal URL regex that does not match it. Check the pattern first, and change it only for addresses you trust.

If the app opens on a page you did not expect after an edit, changing the address in My Apps clears the page it last remembered, per the manual. Edit and Save Changes (Save changes on Windows) otherwise reinstall the same app in place and keep its sign-ins.

A second account is a separate case. Add Another Account (Add another account on Windows) in My Apps copies the app under a new name and starts signed out. See Two accounts on one website.

When something else is the better choice

On an Apple silicon Mac, the iPhone app is the version Douban itself maintains, so use it if you want the phone experience, including anything the website does not offer. Use your browser if you open Douban only now and then, since a separate app adds an icon and a separate set of cookies for little gain. A Pake app is worth it when you are on Douban every day, want it in its own window with its own Dock or Start menu icon, and are on a Mac or PC that cannot run the phone app.

Build it with the CLI

After setting up the CLI:

pake https://www.douban.com/ --name Douban

The CLI reopens a web app on the page you left it on, and --no-restore-last-url starts from the packaged address every time while keeping cookies and sign-in. See the CLI options for window size and the rest. For a general walkthrough, see Website to Mac app.

FAQ

Is there an official Douban app for Mac or Windows?

Douban's own pages mention only the phone client. The App Store listing is the iPhone app, which an Apple silicon Mac can also run.

Will movie.douban.com open inside the app?

With the default rule, yes, when you click it from a page on douban.com, since both share the root domain.

Will I stay signed in after restarting my computer?

You should, as long as Incognito is off and you close the app normally. Open it once after a restart to check, since Douban decides how long its own sign-in lasts.