Hi,
I have created a project to scrape links, unfortunately the web site uses relative URLS, as below. I know the first part of the link, how can I insert this into my table?
<a href="../cgi-bin/wti0001p?&I=LXGBJU&P=Z"</a>
I want it to autocomplete to
<a href="www.targetsite.com/cgi-bin/wti0001p?&I=LXGBJU&P=Z"</a>
Thanks,
Richard
Relative URL
Re: Relative URL
Are you using the Link property? Try creating a JavaScript Gatherer called Link with this code:
or
and extracting the JS_Link property.
Code: Select all
return element.href
Code: Select all
return element.getAttribute("href");
Juan Soldi
The Helium Scraper Team
The Helium Scraper Team
-
- Posts: 2
- Joined: Thu Nov 02, 2017 6:23 am
- Location: London
Re: Relative URL
You can define code into javascript file and set a code into a main page like this
Code: Select all
return element.getAttribute("href");
Code: Select all
return element.getAttribute("href");