IronWebScraper를 ChatGPT Codex와 함께 사용하는 방법
가격 책정 팀은 매일 밤 온라인 카탈로그의 가격을 기록하고 그 전날 밤과 비교합니다. 카탈로그는 다섯 페이지에 걸쳐 있으며, 각 페이지는 서로 연결되어 있습니다. 한 페이지가 크롤 중에 실패하더라도 크롤이 완료되어 파일을 작성합니다. 그런 다음 비교는 누락된 페이지의 모든 제품을 단종된 것으로 나열하고, 팀은 변하지 않은 가격을 기반으로 조치를 취합니다.
ChatGPT Codex는 OpenAI의 코딩 에이전트입니다. 저장소 안에서 파일을 읽고, 편집하며, dotnet run 같은 명령을 실행하여 터미널, IDE 확장, ChatGPT 데스크탑 앱 또는 클라우드에서 변경 사항을 보고합니다. IronWebScraper는 프로젝트가 확장하는 기본 클래스로 .NET에서 크롤링을 제공합니다. 기본 클래스는 요청을 큐에 넣고, 호스트별로 제한하며, 실패를 재시도하고 스크랩된 행을 JSON Lines 파일에 작성합니다.
이 가이드는 Codex에 localhost에서 제공되는 테스트 카탈로그, 규칙 파일 및 두 번의 가격을 제공합니다. 카운트를 요청하는 모든 프롬프트는 또한 해당 내용을 기록하는 파일을 요청하므로, Codex가 보고하는 모든 카운트는 데이터에 의해 뒷받침됩니다. 크롤러가 작성되기 전에 프로브는 IronWebScraper가 실패한 페이지, robots.txt 및 해당 사이트에서의 출력 파일을 어떻게 처리하는지를 측정합니다.
빠른 시작.NET 9 콘솔 프로젝트로 Codex를 시작하고, Data와 TestData 폴더가 포함되어 있으며 테스트 카탈로그가 포트 5461에서 실행 중입니다.
$ironwebscraper Add IronWebScraper 2026.10.1 to this console app and read the first catalogue page.
The test catalogue runs at http://localhost:5461/catalog/page-1.html.
Program.cs crawls that page alone and writes out/quickstart.csv, one row per product.
The CSV has these columns:
- sku, from the data-sku attribute
- name
- price, from the data-price attribute
- shown, the price text the page displays
The price monitor reads IRONWEBSCRAPER_LICENSE_KEY in code and assigns it to License.LicenseKey.
Keep the value out of output, files and logs.
Don't run anything that lists environment variables.
After three failed builds or runs, stop and paste the last error.
Otherwise, count the CSV rows and tell me the number.
최소 워크플로우(5단계)
- NuGet에서 C# 웹 스크래핑 라이브러리 다운로드
- IronWebScraper의 기술을 .agents/skills/ironwebscraper/SKILL.md로 저장하여
$ironwebscraper언급이 해결되도록 합니다. - AGENTS.md를 커밋하여 카트 및 계정 경로를 금지하고 요청 간에 1초를 유지합니다.
- 크롤러를 작성하기 전에 매장에 지역적으로 제공되는 복사본에 대한 실패한 페이지 및 출력 파일을 조사합니다.
- 실패한 요청이나 누락된 페이지가 있는 스냅샷을 거부하고, 별도의 코드를 통해 가격 보고서를 확인합니다.
ChatGPT Codex란 무엇이며, .NET 웹 스크래핑 작업에 어떻게 맞나요?
Codex는 주어진 권한 내에서 작동합니다. Codex CLI 문서는 설치 및 터미널 사용을 다루고, 오픈소스 저장소는 릴리스를 게시합니다.
Codex가 발명한 멤버가 빌드를 실패시킵니다. 컴파일되고 실행되며 조용히 페이지를 건너뛰는 크롤러는 빌드를 통과하며, 이 가이드는 그 두 번째 실패를 다룹니다.
IronWebScraper는 .NET Standard 2.0 및 2.1 어셈블리를 제공하며, 서버가 반환하는 HTML을 구문 분석합니다. 이 가이드의 어떤 크롤도 타사 사이트에 도달하지 않습니다.
IronWebScraper 프롬프트를 작성하고 Codex 설정하는 방법은 무엇인가요?
빠른 시작 프롬프트는 시작 페이지, 필드 및 출력 파일을 지정합니다. 스냅샷 및 서비스 프롬프트는 사이트의 규칙에 대한 Data/README.md를 참조합니다.
Codex는 작업 디렉토리에서 리포지토리 루트까지의 모든 폴더에서 .agents/skills를 스캔합니다. IronWebScraper의 skill.md를 .agents/skills/IronWebScraper/SKILL.md로 저장하면 $ironwebscraper 언급을 해결할 수 있습니다. 기술의 샘플 프로그램은 IronWebScraper 2026.8.1를 대상으로 하지만 이 가이드는 2026.10.1을 설치합니다.
Codex는 실행이 시작될 때 AGENTS.md를 한 번 읽습니다. 저장소 루트에서 작업 폴더까지 이동하며, 더 깊이 있는 파일이 얕은 파일을 덮어씁니다. 실행 중에 작성된 파일은 다음 실행에서 적용됩니다. /init 명령은 첫 번째 초안을 생성합니다.
Create AGENTS.md in the repository root with a Price watch heading.
Give it these rules, one per line:
- IronWebScraper 2026.10.1 does all fetching and parsing.
- No HttpClient code, HtmlAgilityPack or AngleSharp.
- Data/README.md describes the site, the snapshot and the change report. It overrides anything else.
- Crawl localhost only: the test site on port 5461, or a listener a test starts.
- Every scraper adds the patterns */cart/* and */account/* to BannedUrls.
- RateLimitPerHost stays at one second or more.
- Init adds an HttpIdentity whose UserAgent is the one Data/README.md names.
- Data/ and TestData/ are read-only.
- Check IronWebScraper members in the ironwebscraper skill and the installed IronWebScraper.xml.
- When a probe against the test site disagrees with either of them, the probe wins.
- Any count you report comes from a file written that turn, and the reply names it.
- The key stays in IRONWEBSCRAPER_LICENSE_KEY.
Show me the file when it's done.
규칙은 모든 요청이 크롤러를 지정하도록 HttpIdentity를 Init에 추가합니다. 허브의 크롤 기본값은 IronWebScraper가 없는 경우에 발송하는 내용을 보여줍니다.
IronWebScraper를 추가하고 키를 적용하는 방법은 무엇인가요?
Show me the IronWebScraper PackageReference in PriceWatch.csproj and the version NuGet restored.
Paste all of what dotnet list package --include-transitive prints after that.
Leave every package reference as it is.
IronWebScraper 2026.10.1은 IronSoftware.Common 2026.4.2 및 IronSoftware.System.Drawing 2026.8.2에 따라 다릅니다. 테스트 실행의 패키지 목록에는 SixLabors.ImageSharp 3.1.12, Grpc.Net.Client 2.62.0 및 Polly 8.6.6을 포함한 전이적 패키지들이 30개 있었습니다. 릴리스를 고정하기 전에 IronWebScraper 변경 로그를 검토하세요.
IronWebScraper는 IRONWEBSCRAPER_LICENSE_KEY를 무시하므로, 해당 이름 아래에 키를 유지하는 코드는 첫 번째 크롤 전에 License.LicenseKey를 할당합니다.
Move the key line into Startup.ApplyIronWebScraperKey and call it at the top of Program.cs.
After the assignment, the method prints License.IsLicensed.
Next, find out what IronWebScraper does without a key.
Launch three child copies of the program, each with --licence-check N, set up like this:
1. The first child runs with IRONWEBSCRAPER_LICENSE_KEY removed from its environment.
2. The second keeps the variable, but --no-startup stops it from calling Startup.
3. The third keeps the variable and calls Startup.
Each child crawls catalogue page 1 into out/licence-check-N.csv.
Log every child in out/licence-check.csv with these columns:
- run and IsLicensed
- exception type, with no message
- rows written, and whether the child's CSV exists
Tell me which of the three wrote rows.
라이센스 키 페이지는 키를 제공하는 다른 방법을 나열합니다.
IronWebScraper는 실패한 페이지, robots.txt 및 출력 파일을 어떻게 처리하나요?
쇼핑 웹사이트 가이드는 Scrape와 함께 제품을 작성하고 카테고리 파서에서 다음 페이지 링크를 따릅니다. IronWebScraper 2026.10.1의 네 가지 동작이 야간 가격 파일을 신뢰할 수 있는지 여부를 결정하며, 프로브는 테스트 카탈로그에 대해 각각을 측정했습니다.
- 카탈로그 페이지 3이 항상 503을 반환하는 경우 IronWebScraper는 기본
HttpRetryAttempts아래에서 아홉 번 요청하고 오류 없이 그것을 버립니다. 출력에는 47개 제품 중 37개가 포함되었습니다. - 기본적으로
ObeyRobotsDotTxt이 활성화되어 있지만, /robots.txt에 대한 요청이 테스트 사이트에 도달하지 않았고, robots.txt가 허용하지 않는 /cart/아래의 링크가 가져왔습니다. IronWebScraper는 기본 포트에서만 robots.txt를 찾습니다. 패턴*/cart/*이BannedUrls에서 해당 링크를 제외했습니다. Scrape는 파일에 추가됩니다. 동일한 파일에 대한 두 번의 실행은 47개 제품에 대해 94줄을 남겼습니다.ScrapeUnique는 처음 쓰는 레코드를 잃습니다. 세 번의 신규 실행에서 각각 47개의 제품이 46개의 줄을 썼고, LK-1001은 매번 누락되었습니다.
Probe how IronWebScraper treats the test site, in a console app at scratch/crawl-probe/.
Add a Compile Remove item so PriceWatch.csproj skips scratch/**.
Apply the key as Startup does.
Each case gets its own scraper, output folder and try block.
Measure these cases from Parse calls, FailedUrls and the files written:
- queue every nav.pager link from every page, then compare Parse calls with pages
- Scrape the same 10 rows into one file in two separate runs, and count lines after each
- ScrapeUnique 10 different rows into a new file, and count the lines
- request /probe/once-503.html and /probe/always-503.html, and note what reaches Parse
- leave ObeyRobotsDotTxt on and request /probe/blocked/page.html, which robots.txt disallows
- read LK-1045 on catalogue page 5: the price text and the data-price attribute
Then have the explorer agent read IronWebScraper.xml and the ironwebscraper skill, editing nothing.
It reports what both say about Scrape, ScrapeUnique, HttpRetryAttempts and ObeyRobotsDotTxt.
Write every finding into out/crawl-probe.csv, with a quote from the run, the XML or the skill.
Flag each row where a source and the probe disagree, and list those rows for me.
스냅샷 크롤러를 어떻게 구축하나요?
Data/README.md는 1에서 M까지 모든 페이지가 Parse에 도달하고, 요청이 실패하지 않은 경우를 완전한 스냅샷으로 정의합니다. 가격은 데이터 가격 속성에서 가져오는데, LK-1045의 표시된 텍스트는 $1,249.00을 읽는 반면 속성은 1249.00을 유지합니다.
Have the worker agent write Services/CatalogueCrawler.cs.
It builds a snapshot as Data/README.md describes.
PriceWatch takes two commands:
- --snapshot --date YYYY-MM-DD crawls every catalogue page into out/snapshots/<date>.csv
- --compare OLD NEW writes out/changes-NEW.csv from those two snapshot files
Use what the probe found when the crawler writes and checks its output:
- every run starts a new output file, so no rows carry over from an earlier run
- the snapshot is refused when FailedUrls is above zero
- it is also refused when a page from 1 to M never reached Parse
- a refusal prints FailedUrls and the page numbers that reached Parse
- the price column comes from data-price
- the was column comes from span.price-was, without the $ sign or commas
Run --snapshot --date 2026-10-15.
Tell me the row count and the number of pages, both read from the snapshot file.
Codex가 보고한 가격 변화를 어떻게 확인하나요?
The store changed its prices overnight.
Run --snapshot --date 2026-10-16, then --compare 2026-10-15 2026-10-16.
Check the report with code kept apart from the crawler.
That code reads both snapshots and out/changes-2026-10-16.csv.
It writes out/changes-check.csv with these columns:
- sku
- the change the snapshots show
- the change the report lists
- match, yes or no
Give me the count of each change type in the report, plus any row that doesn't match.
산출
아래의 보고서는 테스트 실행의 두 번째 밤에 크롤러가 작성한 파일이며, 변경되지 않았습니다.
테스트 실행의 변경 보고서, out/changes-2026-10-16.csv,순수 텍스트로 표시됨.
카탈로그 페이지가 실패하면 어떻게 되나요?
Catalogue page 3 now answers 503 to every request.
Show me that no snapshot gets saved in that state.
Run --snapshot --date 2026-10-17.
out/snapshots/2026-10-16.csv must stay identical, byte for byte.
Write out/failure-check.csv, holding these values:
- the exit code and the message printed
- FailedUrls and the pages that reached Parse, copied from that message
- whether out/snapshots/2026-10-17.csv exists
- the SHA-256 of the 2026-10-16 snapshot before and after the run
Say whether the snapshot was refused and whether the two hashes are equal.
스크린샷에서 가격을 어떻게 확인하나요?
Codex는 이미지를 컨텍스트로 수용합니다. -i 플래그(긴 형태 --image)와 함께 codex exec 또는 codex exec resume에 전달하거나, 인터랙티브 컴포저에 붙여넣습니다.
테스트 실행에서 첨부된 스크린샷, 첫 번째 밤에 제공된 테스트 사이트의 카탈로그 페이지 1입니다.
A customer sent the screenshot I attached with -i.
They say the Ridge Tent 2P price on it is wrong.
Leave the code alone and go through this in order:
1. Read the name, price and stock of the first three products in the image.
2. Compare them with out/snapshots/2026-10-15.csv and out/snapshots/2026-10-16.csv.
3. Save the comparison as out/screenshot-check.csv.
Then quote the heading shown in the image.
Tell me which day's catalogue it shows and what the tent costs now.
잘못 나간 가격 알림을 어떻게 디버그하나요?
Work out why the 2026-10-16 price alerts went out wrong.
These files describe what happened:
- Data/alert-complaint.md lists four problems.
- Output/price-alerts-2026-10-16.csv is the file that was sent.
- Logs/price-check-2026-10-16.log reports success.
- Logs/store-access-2026-10-16.log is the store's record of the price check's requests.
Start with the explorer agent.
It reads Jobs/LegacyPriceCheck.cs, the two logs and the alert file.
Don't edit any code.
A script under scratch/ may read the files if that helps.
Write out/legacy-diagnosis.md, and include:
- the code line that causes each problem
- why the job log still said it succeeded
- the smallest fix for each problem, backed by a row of out/crawl-probe.csv
Then tell me each problem and its cause, one line per problem.
수정을 허용하기 전에 진단을 검토하십시오. 레거시 작업은 Start가 반환된 후 성공 줄을 기록했으며, FailedUrls를 읽지 않았습니다.
크롤러를 테스트된 서비스로 어떻게 전환하나요?
Ask the worker agent for a PriceWatchService class with these properties:
- A Microsoft.Extensions.DependencyInjection container can resolve it.
- A WatchOptions record configures it with the date, base URL, output folder and rate limit.
- It keeps every rule from Data/README.md and every check CatalogueCrawler makes.
- PriceWatchService.cs stays below 150 lines.
- Every public member carries an XML doc comment.
- Nothing calls Jobs/LegacyPriceCheck.cs.
Then take the 2026-10-16 snapshot again through the service, into out/final/2026-10-16.csv.
Compare it with out/snapshots/2026-10-16.csv and list every difference for me.
IronWebScraper는 자체적으로 가져온 응답만 구문 분석합니다. Response은 저장된 HTML을 불러오는 공개 방법이 없으며, Request에 전달된 로컬 파일 주소는 Parse 호출이 없고 오류도 발생하지 않습니다. Codex 샌드박스 테스트에서 Windows PowerShell의 HttpListener 생성자가 PlatformNotSupportedException을 발생시켰습니다. 루프백에 바인딩된 TcpListener가 작동했으므로 테스트 프롬프트는 그 중 하나에서 저장된 페이지를 제공합니다.
Add an xUnit project at tests/PriceWatch.Tests, in one solution with the main project.
Keep tests/** out of PriceWatch.csproj.
The tests apply the key through Startup.ApplyIronWebScraperKey.
IronWebScraper only parses pages it fetches.
So the tests serve TestData/ from a small TcpListener server on a free localhost port.
None of them calls port 5461.
Together, the tests cover these cases:
- catalog-page-1.html yields 10 products, the first being LK-1001
- LK-1045 on catalog-page-5.html has the price 1249.00
- a crawl where one page answers 503 and the rest answer 200 writes no snapshot
- comparing two small snapshot files finds each change type once
TestData/ holds only pages 1 and 5 of the catalogue.
The 503 case can serve a small made-up catalogue, so the 503 is the only failure.
Use dotnet test --logger trx --results-directory out/tests/.
Read the pass and fail counts from the trx file and tell me both.
마지막 프롬프트는 IronWebScraper.xml의 멤버를 프로브 및 테스트 결과에 대해 확인합니다. XML은 ScrapeUnique을 중복을 무시하는 것으로 설명하고 첫 번째 기록 손실에 대해서는 아무것도 언급하지 않습니다.
$ironwebscraper Find the IronWebScraper.xml members that pace, retry, filter or save a crawl.
For each member, give me these two things:
- the XML's own description of it
- whether out/crawl-probe.csv or a test result under out/tests/ covers it
Then write a line that compiles for each member, in a project at scratch/api-probe/.
Build it with dotnet build scratch/api-probe, and don't run it.
이 프롬프트를 다른 카탈로그에 어떻게 재사용하나요?
프롬프트는 이 카탈로그의 셀렉터, 제품 코드 및 테스트 페이지의 이름을 지정합니다. 공급업체 가격 목록, 마켓플레이스 카테고리 또는 내부 제품 피드에 재사용하려면, 데이터/README.md에서 시작 페이지, 셀렉터 및 스냅샷 열과 함께 프롬프트의 해당 이름을 대체합니다. 모든 어시스턴트에 적용되는 설정에 대해서는 IronWebScraper AI 코딩 어시스턴트 가이드를 참조하세요.
실제 실행에서 프롬프트가 무엇을 생성했습니까?
위의 프롬프트는 로컬호스트의 테스트 카탈로그에 대해 하나의 세션으로 순서대로 Codex에 전송되었습니다. 비교 프롬프트에 도달하기 전에 사이트는 두 번째 밤의 가격으로 전환되었습니다. 레거시 작업, 로그 및 알림은 디버깅 프롬프트 이전에 추가되었습니다. 분리된 스크립트는 모든 출력 파일과 테스트 사이트의 요청 로그를 읽습니다.
- 시작할 때 저장소는 패키지가 없는 콘솔 프로젝트, 카탈로그 규칙 및 저장된 두 개의 카탈로그 페이지를 포함하고 있었습니다.
- 변수가 지워지고 Startup 호출이 건너뛰어지면 크롤은 라이선스 예외를 발생시키고 제품 행을 작성하지 않았습니다.
- 프로브에서 ScrapeUnique는 10개의 개별 행에 대해 9개의 줄을 썼으며, LK-1001은 누락되었습니다.
- 첫 번째 스냅샷에는 다섯 페이지의 47개 모든 제품이 포함되었습니다.
- 두 스냅샷의 모든 필드는 카탈로그와 일치했습니다.
- 변경 보고서에는 3개의 가격 하락, 3개의 가격 상승, 2개의 신제품, 1개의 제거 및 1개의 재고 변동이 나열되었습니다.
- 페이지 3이 실패한 상태로 크롤러는 코드 2로 종료하고 스냅샷을 저장하지 않았습니다.
- IronWebScraper로부터 온 카탈로그 요청은 최소 1,037밀리초 간격으로 수행되었습니다.
- 실행 중의 93개 요청 중 어떤 것도 카트 또는 계정 페이지로 가지 않았습니다.
- Codex는 스크린샷을 첫 번째 밤의 스냅샷과 일치시켰습니다.
- Codex는 텐트의 현재 가격을 $259.00으로 주었습니다.
- 진단은 네 가지 불만 각각을 레거시 작업의 행과 연결했습니다.
- Codex는 탐색기 또는 작업자 에이전트를 지정한 4가지 프롬프트 각각에서 별도의 에이전트를 시작했습니다.
- 서비스는 두 번째 스냅샷을 바이트 단위로 재구축했습니다.
- 503 테스트는 두 페이지로 구성된 가상의 카탈로그를 제공했고, 두 번째 페이지는 503을 반환했습니다.
- Codex와 우리의 마지막 실행에서 모든 네 가지 테스트가 통과했습니다.
- 일부 단계는 페이지와 달리 작동했습니다. 첫 번째 전체 테스트 실행은 네 개의 테스트 중 하나가 실패했고, Codex는 그 테스트의 CSV 분석을 수정했습니다. 테스트 명령이 멈추면 Codex는 설정된 시간 이후에 시작된 모든 dotnet 프로세스를 강제 중지시켰습니다. NuGet 패키지는 실행 전에 복원된 캐시에서 제공되었습니다. 샌드박스는 nuget.org에 접근할 수 없었기 때문입니다.
Google Antigravity 가이드는 브라우저를 통해 사람이 보는 페이지에 대한 크롤 출력을 확인합니다. Claude Code 가이드는 블로그 아카이브 크롤에서 실패한 페이지를 IronWebScraper가 어떻게 떨어뜨리는지를 측정합니다. 공유된 실행 기록은 이 실행에 대한 Codex 버전, 모델, 테스트 기기 및 타이밍을 나열합니다.
문제 해결
- 쇼핑 웹사이트 스크랩이 제품 셀렉터나 페이징에 참조가 필요한 경우
- 고급 웹 스크래핑 기능이 요청이 제한되거나, 신원이 필요하거나 재개 가능한 크롤이 필요한 경우
- 라이선스 키 적용이 모든 크롤이 요청이 전송되기 전에 라이선스 예외로 중단되는 경우
질문?
질문이 있으시면 support@ironsoftware.com으로 문의하세요.
커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

