Skip to content

"Curl: Download Error" with relative path in anchor tag #10

@MartijnThomas

Description

@MartijnThomas

Great package and extremely easy API, I bumped into one problem though. When I click on a link that has a relative path, I get a curl error:

Curl: Download Error: <url> malformed, status 0 on url /some-link

This is a node that failed for example:

<a href="/some-link">The title of the link</a>

The code used (with the default driver):

$page = new \Openbuildings\Spiderling\Page();

$page->visit('https://example.com/');

$urls = $page->all('.LinkItem h3 > a');

foreach($urls as $url)
{
    $url->click();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions