Raccolta: 429 del CDN come rallentamento, attese crescenti e recupero dei falliti, storico e seguiti senza pagina di ripresa, lacuna sotto la prima pagina, eliminazioni durante lo scaricamento (regole-3, cdn-429, dl-1, post-loop, walk-1, check-1, scroll-1, reader-1, h9-1, ring-1, library-2, dedup-1, tmp-1, budget-1, regole-4, kind-1, vocab-1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
Claude committed 2026-10-14 00:23:03 +00:00
1 parent 78c92eb2a4
commit b16e3a837d
28 files changed
+2619 -200

No files matched your search

@@ -29,11 +29,14 @@ public static class ReadMapping
};
}
/// <summary>The files of a content item, positions from 1, with the addresses of the chosen versions.</summary>
/// <summary>
/// The files of a content item with the addresses of the chosen versions. Positions are the places the series
/// declares (from 1): a child that could not be read leaves its place free for «Post singolo» to fill.
/// </summary>
public static IReadOnlyList<Media> ToMedia(ContentItem item, DateTimeOffset now)
{
ArgumentNullException.ThrowIfNull(item);
return [.. item.Files.Select((file, index) => ToMedia(file, index + 1, now))];
return [.. item.Files.Select((file, index) => ToMedia(file, file.Position ?? index + 1, now))];
}
public static Media ToMedia(ContentFile file, int position, DateTimeOffset now)
@@ -25,7 +25,15 @@ public sealed record FileVersion(string Url, int? Width, int? Height, bool? HasA
/// <param name="Best">Largest image, or best video version complete with audio.</param>
/// <param name="Cover">For videos: the largest cover image.</param>
/// <param name="Duration">Video duration, when given.</param>
public sealed record ContentFile(MediaKind Kind, string? InstagramId, FileVersion Best, FileVersion? Cover, TimeSpan? Duration);
public sealed record ContentFile(MediaKind Kind, string? InstagramId, FileVersion Best, FileVersion? Cover, TimeSpan? Duration)
{
/// <summary>
/// Place of the file in its series, from 1, counting the children the response declares even when one of them
/// cannot be read (no versions yet): a missing file leaves a gap instead of moving the following ones. Null for
/// a content with a single file.
/// </summary>
public int? Position { get; init; }
}
/// <summary>A profile as it appears in a response (author of content, profile page, list of followed profiles).</summary>
public sealed record ProfileInfo
@@ -206,6 +206,10 @@ public sealed record ReaderVocabulary
Need(Content.TakenAt, "content.takenAt");
Need(Content.Images, "content.images");
Need(Content.Videos, "content.videos");
// Without the author nothing tells whose a post is: the giro dei seguiti would save nothing and the profile
// recipes would skip every post, silently.
Need(Content.Owner, "content.owner");
Need(Version.Url, "version.url");
Need(Version.Width, "version.width");
Need(Version.Height, "version.height");
@@ -188,7 +188,7 @@ public sealed class ShapeReader
declaredChildren++;
if (child.ValueKind == JsonValueKind.Object && ReadFile(child) is { } file)
{
files.Add(file);
files.Add(file with { Position = declaredChildren });
}
}
}