Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: update default UA

NTFSvolume15342f525fa9
diff --git a/cyberdrop_dl/config/default.yaml b/cyberdrop_dl/config/default.yaml
index ed91dfe34..ad94a355e 100644
--- a/cyberdrop_dl/config/default.yaml
+++ b/cyberdrop_dl/config/default.yaml
@@ -18,14 +18,14 @@ cookies: null
crawlers:
bandcamp:
formats:
- - mp3-320
- - mp3
- - aac-hi
- - wav
- - flac
- - vorbis
- - aiff
- - alas
+ - mp3-320
+ - mp3
+ - aac-hi
+ - wav
+ - flac
+ - vorbis
+ - aiff
+ - alas
clonr:
use_source: false
zip: false
@@ -46,7 +46,7 @@ crawlers:
sheets: xslx
slides: pptx
octave_music:
- filename_format: '{artist} - {title}{ext}'
+ filename_format: "{artist} - {title}{ext}"
quality: mp3-320
one_pace:
prefer_dub: false
@@ -62,10 +62,10 @@ crawlers:
file: true
pornhub:
profile_paths:
- - photos/public
- - gifs/public
- - videos
- - videos/upload
+ - photos/public
+ - gifs/public
+ - videos
+ - videos/upload
tiktok:
original: false
twitter:
@@ -129,9 +129,9 @@ filters:
skip_hosts: []
hashing:
algorithms:
- - xxh128
- - md5
- - sha256
+ - xxh128
+ - md5
+ - sha256
dedupe:
enabled: true
use_trash_bin: true
@@ -182,9 +182,9 @@ network:
ssl_context: truststore+certifi
tls:
ca_certs: []
- min_version: '1.2'
+ min_version: "1.2"
verify: true
- user_agent: Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0
+ user_agent: Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0
notifications:
apprise: []
webhook: null
@@ -192,11 +192,11 @@ restrict_path: []
sort:
enabled: false
formats:
- audio: '{sort_dir}/{base_dir}/Audio/{filename}{ext}'
- image: '{sort_dir}/{base_dir}/Images/{filename}{ext}'
- incrementer: ' ({i})'
- non_media: '{sort_dir}/{base_dir}/Other/{filename}{ext}'
- video: '{sort_dir}/{base_dir}/Videos/{filename}{ext}'
+ audio: "{sort_dir}/{base_dir}/Audio/{filename}{ext}"
+ image: "{sort_dir}/{base_dir}/Images/{filename}{ext}"
+ incrementer: " ({i})"
+ non_media: "{sort_dir}/{base_dir}/Other/{filename}{ext}"
+ video: "{sort_dir}/{base_dir}/Videos/{filename}{ext}"
input_folder: null
output_folder: downloads/cyberdrop-dl sorted
subfolders:
@@ -207,7 +207,7 @@ subfolders:
thread_id: false
separate_posts:
enabled: false
- format: '{default}'
+ format: "{default}"
ui:
mode: fullscreen
portrait: false
diff --git a/cyberdrop_dl/config/schema.json b/cyberdrop_dl/config/schema.json
index 835034e25..8af6101b1 100644
--- a/cyberdrop_dl/config/schema.json
+++ b/cyberdrop_dl/config/schema.json
@@ -38,9 +38,7 @@
"uniqueItems": true
}
},
- "required": [
- "url"
- ],
+ "required": ["url"],
"title": "AppriseURL",
"type": "object"
},
@@ -315,11 +313,7 @@
"FalsyAsNone_Annotated_Literal__truststore____certifi____truststore_certifi____BeforeValidator__": {
"anyOf": [
{
- "enum": [
- "truststore",
- "certifi",
- "truststore+certifi"
- ],
+ "enum": ["truststore", "certifi", "truststore+certifi"],
"type": "string"
},
{
@@ -566,37 +560,19 @@
"properties": {
"docs": {
"default": "docx",
- "enum": [
- "docx",
- "odt",
- "rtf",
- "txt",
- "epub",
- "pdf",
- "md",
- "zip"
- ],
+ "enum": ["docx", "odt", "rtf", "txt", "epub", "pdf", "md", "zip"],
"title": "Docs",
"type": "string"
},
"sheets": {
"default": "xslx",
- "enum": [
- "xslx",
- "ods",
- "html",
- "csv",
- "tsv"
- ],
+ "enum": ["xslx", "ods", "html", "csv", "tsv"],
"title": "Sheets",
"type": "string"
},
"slides": {
"default": "pptx",
- "enum": [
- "pptx",
- "odp"
- ],
+ "enum": ["pptx", "odp"],
"title": "Slides",
"type": "string"
}
@@ -605,11 +581,7 @@
"type": "object"
},
"HashMode": {
- "enum": [
- "off",
- "in_place",
- "post_download"
- ],
+ "enum": ["off", "in_place", "post_download"],
"title": "HashMode",
"type": "string"
},
@@ -621,17 +593,9 @@
"default": "in_place"
},
"algorithms": {
- "default": [
- "xxh128",
- "md5",
- "sha256"
- ],
+ "default": ["xxh128", "md5", "sha256"],
"items": {
- "enum": [
- "xxh128",
- "md5",
- "sha256"
- ],
+ "enum": ["xxh128", "md5", "sha256"],
"type": "string"
},
"title": "Algorithms",
@@ -797,13 +761,7 @@
"type": "object"
},
"LogLevel": {
- "enum": [
- "DEBUG",
- "INFO",
- "WARNING",
- "ERROR",
- "CRITICAL"
- ],
+ "enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
"type": "string"
},
"LogPath": {
@@ -936,7 +894,7 @@
},
"user_agent": {
"$ref": "#/$defs/NonEmptyStr",
- "default": "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
+ "default": "Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0"
},
"impersonate": {
"$ref": "#/$defs/FalsyAsNone_ImpersonateTarget_",
@@ -974,10 +932,7 @@
"properties": {
"quality": {
"default": "mp3-320",
- "enum": [
- "lossless",
- "mp3-320"
- ],
+ "enum": ["lossless", "mp3-320"],
"title": "Quality",
"type": "string"
},
@@ -1101,10 +1056,7 @@
},
"min_version": {
"default": "1.2",
- "enum": [
- "1.2",
- "1.3"
- ],
+ "enum": ["1.2", "1.3"],
"title": "Min Version",
"type": "string"
},
@@ -1182,14 +1134,7 @@
},
"image_size": {
"default": "orig",
- "enum": [
- "orig",
- "4096x4096",
- "large",
- "medium",
- "small",
- "thumb"
- ],
+ "enum": ["orig", "4096x4096", "large", "medium", "small", "thumb"],
"title": "Image Size",
"type": "string"
}
@@ -1198,12 +1143,7 @@
"type": "object"
},
"UIMode": {
- "enum": [
- "disabled",
- "activity",
- "simple",
- "fullscreen"
- ],
+ "enum": ["disabled", "activity", "simple", "fullscreen"],
"title": "UIMode",
"type": "string"
},
@@ -1519,12 +1459,7 @@
"restrict_path": {
"default": [],
"items": {
- "enum": [
- "unix",
- "windows",
- "no_emoji",
- "ascii"
- ],
+ "enum": ["unix", "windows", "no_emoji", "ascii"],
"type": "string"
},
"title": "Restrict Path",
diff --git a/cyberdrop_dl/config/settings.py b/cyberdrop_dl/config/settings.py
index c66980bb5..a6b4f1f59 100644
--- a/cyberdrop_dl/config/settings.py
+++ b/cyberdrop_dl/config/settings.py
@@ -371,7 +371,7 @@ class Network(ConfigGroup):
] = Field(default="truststore+certifi", deprecated=True)
tls: TLS = Field(default_factory=TLS)
- user_agent: NonEmptyStr = "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
+ user_agent: NonEmptyStr = "Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0"
impersonate: FalsyAsNone[ImpersonateTarget] = None
"Use this target as impersonation for all scrape requests"
diff --git a/cyberdrop_dl/crawlers/voe_sx.py b/cyberdrop_dl/crawlers/voe_sx.py
index 6f367629f..71aa29c90 100644
--- a/cyberdrop_dl/crawlers/voe_sx.py
+++ b/cyberdrop_dl/crawlers/voe_sx.py
@@ -46,7 +46,7 @@ _ISO639_MAP = {
_HEADERS: dict[str, str] = {
"User-Agent": # Force firefox on linux to get high res mp4 formats as "fallbacks"
- "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
+ "Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0"
}
diff --git a/docs/reference/config/network.md b/docs/reference/config/network.md
index a95e1e5f0..bd8bacf0d 100644
--- a/docs/reference/config/network.md
+++ b/docs/reference/config/network.md
@@ -215,14 +215,14 @@ tls:
| Type | Default |
| ------------- | ------------------------------------------------------------------------ |
-| `NonEmptyStr` | `Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0` |
+| `NonEmptyStr` | `Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0` |
The user agent is the signature of your browser. Some sites use it to identify if the request came from a human or a robot.
You can google "what is my user agent" to get yours.
```yaml
network:
- user_agent: Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0
+ user_agent: Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0
```
{% hint style="info" %}