I simply need to know how to extract part of the url that I am redirected to by the site, instead of the body of the website. Can you point me in the right direction please?
How do I extract part of the URL as a session variable?
The url SS requests is this:
https://jeffersonpva.ky.gov/property-search/property-listings/?psfldAddress=123+Main+St&propertySearchFormButton=Search&searchType=StreetSearch#results
It redirects to this URL:
https://jeffersonpva.ky.gov/property-search/property-details/?StrtNum=123&Single=1&lrsn=8002423
I need to extract the last number in the URL like this:
https://jeffersonpva.ky.gov/property-search/property-details/?StrtNum=123&Single=1&lrsn=~#SEARCH#~
Hmm. I guess I need more
Hmm. I guess I need more explanation than I thought. See below
I would think that after you
I would think that after you get to the landing page, run a script with
Would work. See: https://support.screen-scraper.com/documentation/api/scrapeablefile/getcurrenturl
How do I extract part of the
How do I extract part of the URL as a session variable?
The url SS requests is this:
https://jeffersonpva.ky.gov/property-search/property-listings/?psfldAddress=123+Main+St&propertySearchFormButton=Search&searchType=StreetSearch#results
It redirects to this URL:
https://jeffersonpva.ky.gov/property-search/property-details/?StrtNum=123&Single=1&lrsn=8002423
I need to extract the last number in the URL like this:
https://jeffersonpva.ky.gov/property-search/property-details/?StrtNum=123&Single=1&lrsn=~#SEARCH#~
Thanks in advance.
I would invoke a script like
I would invoke a script like this:
String url = scrapeableFile.getCurrentURL();
String paramStr = StringUtils.substringAfter(url, "?");
String[] params = paramStr.split("&");
for(int i=0; i<params.length; i++)
{
String param = params[i];
log.log("---" + param);
if(param.startsWith("lrsn"))
{
String val = StringUtils.substringAfter(param, "=");
log.log("-----Isolated value: " + val);
}
}