Is there a way to always get absolute URLs? #576
Labels
status/review-needed
type/enhancement
New feature or request
type/question
Further information is requested
Milestone
I wanted to know if there's a way to make Ferret always return absolute URLs when they are relative in the source code, like web browsers do.
I'm crawling a site by getting a bunch of
href
attribute values from different anchors into an array and then iterating that array to load and return the content I need from each of the URLs.The problem is that some of the URLs are absolute (https://example.com/whatever) and others are relative (/whichever), so when I try to get a
DOCUMENT
from one of the relative URLs, I get the following error:I'd ideally want to run the entire process in a single FQL script, but I couldn't find a way to convert the relative URLs or make them work, so it seems my only option is to first return them to a Go program to be fixed and then run an additional data-gathering query on each of them.
The text was updated successfully, but these errors were encountered: