@@ -45,31 +45,6 @@ pip install -e . # core only
4545pip install -e " .[all]" # core + all LLM providers
4646```
4747
48- ## Quick Start
49-
50- ``` python
51- import asyncio
52- from maxun import Extract, Config
53-
54- async def main ():
55- extractor = Extract(Config(api_key = " your-api-key" ))
56-
57- robot = await (
58- extractor
59- .create(" HN Top Story" )
60- .navigate(" https://news.ycombinator.com" )
61- .capture_text({
62- " Title" : " tr.athing:first-child .titleline > a" ,
63- " Points" : " tr.athing:first-child + tr .score" ,
64- })
65- )
66-
67- result = await robot.run()
68- print (result[" data" ][" textData" ])
69-
70- asyncio.run(main())
71- ```
72-
7348## Configuration
7449
7550``` python
@@ -92,38 +67,6 @@ MAXUN_TEAM_ID=your-team-uuid
9267
9368## Core Classes
9469
95- ### Extract
96-
97- Build robots that extract structured data from pages.
98-
99- ``` python
100- from maxun import Extract, Config
101-
102- extractor = Extract(Config(api_key = " ..." ))
103-
104- # Capture specific text fields
105- robot = await (
106- extractor
107- .create(" My Robot" )
108- .navigate(" https://example.com" )
109- .capture_text({" Title" : " h1" , " Price" : " .price" })
110- )
111-
112- # Capture a list of items with optional pagination
113- robot = await (
114- extractor
115- .create(" Product List" )
116- .navigate(" https://shop.example.com" )
117- .capture_list({
118- " selector" : " article.product" ,
119- " pagination" : {" type" : " clickNext" , " selector" : " a.next" },
120- " maxItems" : 100 ,
121- })
122- )
123-
124- result = await robot.run()
125- ```
126-
12770### Scrape
12871
12972Scrape full pages as Markdown, HTML, or screenshots.
@@ -191,6 +134,38 @@ robot = await searcher.create(
191134result = await robot.run()
192135```
193136
137+ ### Extract
138+
139+ Build robots that extract structured data from pages.
140+
141+ ``` python
142+ from maxun import Extract, Config
143+
144+ extractor = Extract(Config(api_key = " ..." ))
145+
146+ # Capture specific text fields
147+ robot = await (
148+ extractor
149+ .create(" My Robot" )
150+ .navigate(" https://example.com" )
151+ .capture_text({" Title" : " h1" , " Price" : " .price" })
152+ )
153+
154+ # Capture a list of items with optional pagination
155+ robot = await (
156+ extractor
157+ .create(" Product List" )
158+ .navigate(" https://shop.example.com" )
159+ .capture_list({
160+ " selector" : " article.product" ,
161+ " pagination" : {" type" : " clickNext" , " selector" : " a.next" },
162+ " maxItems" : 100 ,
163+ })
164+ )
165+
166+ result = await robot.run()
167+ ```
168+
194169### LLM Extraction
195170
196171Use a natural language prompt to extract data.
0 commit comments