Recent

Author Topic: crawler - relative to absolute path  (Read 1940 times)

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 258
crawler - relative to absolute path
« on: February 18, 2018, 07:41:05 pm »
Have start HTML page read, parsed, href-s extracted.

if start page is like:
Quote
http://www.foo.com/foo1/foo2/

and what I got from href is like

Quote
/foo3/foo4.html

Ok, I know this is absolute:http://www.foo.com/foo3/foo4.html
but how to make this absolute path  programaticaly ? Including all possible stuff like ../../.. and alike

so far using: httpsend, sax_html, dom_html, dom
lazarus 3.2-fpc-3.2.2-win32/win64

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 258
Re: crawler - relative to absolute path
« Reply #1 on: February 19, 2018, 03:33:06 am »
apparently FileUtil.CreateAbsolutePath should do
« Last Edit: February 19, 2018, 03:38:52 am by BubikolRamios »
lazarus 3.2-fpc-3.2.2-win32/win64

 

TinyPortal © 2005-2018