This commit is contained in:
dgtlmoon
2026-03-24 14:44:15 +01:00
parent a69d14f5ee
commit e8c8be94e6
4 changed files with 15 additions and 11 deletions
@@ -17,6 +17,7 @@
<th style="width:2.5em; text-align:center;" title="{{ _('System default') }}">{{ _('Default') }}</th>
<th>{{ _('Name') }}</th>
<th>{{ _('Fetch method') }}</th>
<th style="width:3em; text-align:center;"></th>
<th>{{ _('Viewport') }}</th>
<th>{{ _('Options') }}</th>
<th></th>
@@ -38,6 +39,7 @@
{% if profile.is_builtin %}<span style="font-size:0.75em; margin-left:0.4em; background:#888; color:#fff; padding:1px 5px; border-radius:3px;">{{ _('built-in') }}</span>{% endif %}
</td>
<td><code>{{ profile.fetch_backend }}</code></td>
<td style="text-align:center;">{{ profile.get_fetcher_class_name()|fetcher_status_icons }}</td>
<td>{{ profile.viewport_width }}×{{ profile.viewport_height }}</td>
<td>
{% if profile.block_images %}<span title="{{ _('Images blocked') }}">&#x1F6AB;&#x1F5BC;</span> {% endif %}
+5 -1
View File
@@ -67,6 +67,10 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q, queuedWatchMe
default['proxy'] = ''
# proxy_override set to the json/text list of the items
# browser_profile: None means "use system default" — map to 'system' so the radio pre-selects correctly
if not default.get('browser_profile'):
default['browser_profile'] = 'system'
# Does it use some custom form? does one exist?
processor_name = datastore.data['watching'][uuid].get('processor', '')
processor_classes = next((tpl for tpl in processors.find_processors() if tpl[1] == processor_name), None)
@@ -224,7 +228,7 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q, queuedWatchMe
# Recast it if need be to right data Watch handler
watch_class = processors.get_custom_watch_obj_for_processor(form.data.get('processor'))
datastore.data['watching'][uuid] = watch_class(datastore_path=datastore.datastore_path, __datastore=datastore.data, default=datastore.data['watching'][uuid])
datastore.data['watching'][uuid] = watch_class(datastore_path=datastore.datastore_path, __datastore=datastore, default=datastore.data['watching'][uuid])
# Save the watch immediately
datastore.data['watching'][uuid].commit()
+1 -1
View File
@@ -187,7 +187,7 @@ class watch_base(dict):
'content-type': None,
'date_created': None,
'extract_text': [], # Extract text by regex after filters
'browser_profile': None, # machine-name key of a BrowserProfile; None → resolve via chain
'browser_profile': 'system', # machine-name key of a BrowserProfile; 'system' → resolve via chain
'fetch_backend': 'system', # plaintext, playwright etc
'fetch_time': 0.0,
'filter_failure_notification_send': strtobool(os.getenv('FILTER_FAILURE_NOTIFICATION_SEND_DEFAULT', 'True')),
+7 -9
View File
@@ -316,17 +316,15 @@ components:
type: string
enum: [GET, POST, DELETE, PUT]
description: HTTP method to use
fetch_backend:
browser_profile:
type: string
description: |
Backend to use for fetching content. Common values:
- `system` (default) - Use the system-wide default fetcher
- `html_requests` - Fast requests-based fetcher
- `html_webdriver` - Browser-based fetcher (Playwright/Puppeteer)
- `extra_browser_*` - Custom browser configurations (if configured)
- Plugin-provided fetchers (if installed)
pattern: '^(system|html_requests|html_webdriver|extra_browser_.+)$'
default: system
Browser profile (machine name) to use for fetching this watch.
- `null` or omitted — use the system default profile
- `direct_http_requests` — fast requests-based fetcher
- `browser_chromeplaywright` — Chrome/Playwright browser
- Any named profile configured in Settings → Browsers
- Plugin-provided profiles (e.g. CloakBrowser, if installed)
headers:
type: object
additionalProperties: