Skip to content

Commit

Permalink
add thorium cookies support
Browse files Browse the repository at this point in the history
- Update cookies.py
- preserve lexicographical order
  • Loading branch information
joskezelensky authored and mikf committed Jun 27, 2024
1 parent 8bb793e commit b2a40a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gallery_dl/cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


SUPPORTED_BROWSERS_CHROMIUM = {
"brave", "chrome", "chromium", "edge", "opera", "vivaldi"}
"brave", "chrome", "chromium", "edge", "opera", "thorium", "vivaldi"}
SUPPORTED_BROWSERS = SUPPORTED_BROWSERS_CHROMIUM | {"firefox", "safari"}

logger = logging.getLogger("cookies")
Expand Down Expand Up @@ -354,6 +354,7 @@ def _get_chromium_based_browser_settings(browser_name):
"chromium": join(appdata_local, R"Chromium\User Data"),
"edge" : join(appdata_local, R"Microsoft\Edge\User Data"),
"opera" : join(appdata_roaming, R"Opera Software\Opera Stable"),
"thorium" : join(appdata_local, R"Thorium\User Data"),
"vivaldi" : join(appdata_local, R"Vivaldi\User Data"),
}[browser_name]

Expand All @@ -365,6 +366,7 @@ def _get_chromium_based_browser_settings(browser_name):
"chromium": join(appdata, "Chromium"),
"edge" : join(appdata, "Microsoft Edge"),
"opera" : join(appdata, "com.operasoftware.Opera"),
"thorium" : join(appdata, "Thorium"),
"vivaldi" : join(appdata, "Vivaldi"),
}[browser_name]

Expand All @@ -377,6 +379,7 @@ def _get_chromium_based_browser_settings(browser_name):
"chromium": join(config, "chromium"),
"edge" : join(config, "microsoft-edge"),
"opera" : join(config, "opera"),
"thorium" : join(config, "Thorium"),
"vivaldi" : join(config, "vivaldi"),
}[browser_name]

Expand All @@ -390,6 +393,7 @@ def _get_chromium_based_browser_settings(browser_name):
"edge" : "Microsoft Edge" if sys.platform == "darwin" else
"Chromium",
"opera" : "Opera" if sys.platform == "darwin" else "Chromium",
"thorium" : "Thorium",
"vivaldi" : "Vivaldi" if sys.platform == "darwin" else "Chrome",
}[browser_name]

Expand Down

0 comments on commit b2a40a5

Please sign in to comment.