Closed derjochenmeyer closed 5 months ago
Hey @derjochenmeyer 👋
The Http::crawl()
produces the same output as all other Http
steps, so you can do:
$crawler->input('https://www.example.com/sitemap.xml')
->addStep(
Http::crawl()
->inputIsSitemap()
->maxOutputs(5)
->addToResult(['url', 'status', 'headers', 'body'])
)
->addStep(
Crawler::group()
->addStep(
Html::root()
->extract([
'title' => 'h1',
'date' => '#date',
])
)
->addStep(
Html::metaData()
->only(['keywords', 'publisher'])
)
->addToResult()
);
Hope that solves your problem? I'll try to add this information to the docs somehow 👍🏻
Mille Grazie! That solved it.
I want to add Response Data to the Result as documented here.
From the documentation I cannot figure out how to add this step to my working code which looks like this:
Is there a way to add a
Http::get()
step to this approach? Or is there another sulution?