tonhowtf/omniget · error · anyhow::Error
nenhuma publicação válida na lista
Error message
nenhuma publicação válida na lista
What it means
After resolving the export targets — either from the session's subscriptions or from a user-provided list of URLs/publication names — substack::run checks whether the resulting targets vector is empty. If no entry could be parsed into a valid publication (custom domain or <name>.substack.com host), the export cannot proceed and this error is raised.
Solutions
- Provide valid publication URLs or hosts (e.g. https://example.substack.com or a custom domain) in opts.publications
- Log in with a session (capture cookies) so discover() can supply valid subscription targets
- Strip protocol/path noise and verify each entry resolves to a publication host before building Options
Example fix
// before
let opts = Options { publications: vec!["my substack".into()], .. };
// after
let opts = Options { publications: vec!["https://mysub.substack.com".into()], .. }; Defensive patterns
Strategy: validation
Validate before calling
fn valid_host(entry: &str) -> bool {
let e = entry.trim();
e.ends_with(".substack.com") || (!e.contains(' ') && e.contains('.'))
}
let targets: Vec<_> = opts.publications.iter().filter(|p| valid_host(p)).collect();
if targets.is_empty() { anyhow::bail!("no valid publications provided"); } Type guard
fn is_publication_url(entry: &str) -> bool {
entry.starts_with("https://") && (entry.contains(".substack.com/") || entry.contains(".substack.com"))
} Prevention
- Sanitize user-entered publication lists: accept full URLs, extract and validate hosts
- Prefer session-based discovery over manual lists whenever cookies are available
- Show per-entry parse feedback in the UI so invalid entries are visible before export
When it happens
Trigger: Calling run() with opts.publications containing only entries that fail host parsing (no valid substack.com or custom-domain host), or an empty manual list combined with no usable session subscriptions.
Common situations: User typed publication names by hand with typos or full HTML pasted in; URLs pointing to post pages rather than the publication; pasting 'substack.com' itself rather than a publication domain; non-ASCII or whitespace-only entries filtered out.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- escolha a pasta de destino
- escolha ao menos um formato
- Track sem metadata pra resolver no YouTube
- escolha a pasta de destino para organizar
- informe um appid, um link da loja ou marque a biblioteca…
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/f5b4994507a5af85.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/blogs/substack.rs:422
"discover",
0,
None,
Some("assinaturas".into()),
);
discover(&fetcher).await?
} else {
opts.publications
.iter()
.filter_map(|p| normalize_host(p))
.map(|host| Subscription {
name: host.clone(),
host,
paid: false,
})
.collect()
};
if targets.is_empty() {
return Err(anyhow!("nenhuma publicação válida na lista"));
}
let since = opts.since.trim().to_string();
let mut out = ArchiveResult {
used_session: fetcher.has_session(),
dest: root.to_string_lossy().to_string(),
publications: Vec::new(),
posts: 0,
locked: 0,
images: 0,
requests: 0,
files: Vec::new(),
};
let total = targets.len() as u64;
for (i, sub) in targets.iter().enumerate() {
crate::core::tools::report(
&progress,View on GitHub (pinned to 8600b91f42)