Brings up the pull-model scraper: the .NET C2 hands skin+wear jobs to Python nodriver workers that scrape cs.money and post results back, plus the supporting Core/EFCore data model, migrations, and docker-compose orchestration. IPRoyal proxying lets workers scale horizontally with a distinct residential exit IP each: every worker process mints its own sticky session at startup, and an in-process forwarding proxy injects the gateway auth so Chromium talks only to an auth-free localhost endpoint (zero CDP). On a Cloudflare challenge a worker rotates to a fresh session/IP and re-warms. Verified end-to-end against live IPRoyal: distinct US residential exits per worker and IP rotation on demand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
791 B
C#
22 lines
791 B
C#
namespace BlueLaminate.Core.CsMoney;
|
|
|
|
/// <summary>
|
|
/// Maps between the catalogue's full wear names (<c>SkinCondition.Condition</c>) and
|
|
/// cs.money's short wear codes (the <c>quality</c> field, also used in market search).
|
|
/// </summary>
|
|
public static class Wear
|
|
{
|
|
private static readonly Dictionary<string, string> NameToCode = new(StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
["Factory New"] = "fn",
|
|
["Minimal Wear"] = "mw",
|
|
["Field-Tested"] = "ft",
|
|
["Well-Worn"] = "ww",
|
|
["Battle-Scarred"] = "bs",
|
|
};
|
|
|
|
/// <summary>"Field-Tested" → "ft". Null/unknown → null.</summary>
|
|
public static string? ToCode(string? conditionName) =>
|
|
conditionName is not null && NameToCode.TryGetValue(conditionName, out var code) ? code : null;
|
|
}
|