Ricerca dei profili con suggerimenti e foto (#37)
«Aggiungi account» ha una sola casella: mentre Alberto scrive compaiono subito i suggerimenti locali, poi i profili di Instagram con la foto, come chiesto in #37. Il browser di Febe scrive nella casella «Cerca» di Instagram con tasti veri da una mappa chiusa (mai Invio, Tab o Esc), controlla prima il fuoco, legge la risposta della pagina e non clicca mai un risultato. La ricerca ha una categoria propria nel Governatore, con tetti larghi che non consumano quelli della raccolta, e si dà il turno con il motore sull'unica pagina; a fine sessione la pagina torna comunque al riposo. Le foto passano dal CDN con un permesso ciascuna e restano solo in memoria. Le risposte di Alberto del 15 novembre (controllo del fuoco, turni, evento requestWillBeSent, niente foto dei seguiti per ora) sono in §6.1 e in docs/decisioni.md. Su Instagram vero la ricerca parte quando i bersagli search-open e search-box saranno raccolti dal vivo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5e417c666d
commit
9941a2fa1f
98 files changed
+8021
-229
No files matched your search
@@ -12,6 +12,7 @@ using Febe.Core.Collection.Diagnostics;
|
||||
using Febe.Core.Collection.Downloads;
|
||||
using Febe.Core.Collection.Readers;
|
||||
using Febe.Core.Collection.Recipes;
|
||||
using Febe.Core.Collection.Search;
|
||||
using Febe.Core.Domain;
|
||||
using Febe.Core.Engine;
|
||||
using Febe.SitoDiProva;
|
||||
@@ -131,7 +132,16 @@ internal sealed class CollectionHarness : IAsyncDisposable
|
||||
/// <summary>The recorder of the diagnostic report, when asked for: what the page does goes to <see cref="Session"/>.</summary>
|
||||
public CollectionDiagnostics? Diagnostics { get; private set; }
|
||||
|
||||
public static async Task<CollectionHarness> CreateAsync(SharedChromium chromium, RecipeOptions? options = null, double factor = 10, bool diagnostics = false)
|
||||
/// <summary>The turns of the page shared by the recipes and the profile search (issue #37).</summary>
|
||||
public PageTurns Turns { get; } = new();
|
||||
|
||||
/// <summary>The photos of the profile search, in memory.</summary>
|
||||
public SearchPhotoCache SearchPhotos { get; private set; } = null!;
|
||||
|
||||
/// <summary>The browser half of the profile search.</summary>
|
||||
public ProfileSearchRunner Search => Pipeline.Search!;
|
||||
|
||||
public static async Task<CollectionHarness> CreateAsync(SharedChromium chromium, RecipeOptions? options = null, double factor = 10, bool diagnostics = false, ProfileSearchOptions? search = null)
|
||||
{
|
||||
var site = await SyntheticSite.StartAsync();
|
||||
var temp = new TempFolder("raccolta");
|
||||
@@ -143,8 +153,13 @@ internal sealed class CollectionHarness : IAsyncDisposable
|
||||
harness.Diagnostics = new CollectionDiagnostics(clock, () => harness.Session.SessionId);
|
||||
}
|
||||
|
||||
var searchOptions = search ?? new ProfileSearchOptions { AnswerTimeout = TimeSpan.FromSeconds(30) };
|
||||
harness.SearchPhotos = new SearchPhotoCache(clock, searchOptions);
|
||||
harness.Pipeline = await CollectionPipeline.StartAsync(new CollectionPipelineOptions
|
||||
{
|
||||
PageTurns = harness.Turns,
|
||||
SearchOptions = searchOptions,
|
||||
SearchPhotos = harness.SearchPhotos,
|
||||
Cdp = chromium.Cdp,
|
||||
Site = CollectionSite.TestSite(site.SiteHost, site.CdnHost),
|
||||
Storage = library.Db,
|
||||
|
||||
Reference in new issue
Block a user