Parsing url token question
-
Like i go to a parent site example.com
After clicking ( clicking on certain thing that open a new site) it's directed on something it goes on another sites
Like anything.com/anything &token=xxxxxxx
So i wanna know how to Parse token on that url .
U had tried parese boxAnd replaced <source> to <address> not working
Do i have to put parse box before or after the directed url....
-
It doesn't work like that. The token must be sent to you in a response, it's your browser that's reading it from a response and putting it into the address bar.
-
So no need to Parse?
-
yes you need to parse
-
loliscript:
PRINT <ADDRESS>
SET VAR "tok" "<ADDRESS>"
-
can you explaiplain me in detail
-
make sure to check the response headers there's usually some sort of redirect header.
-
anything.com/anything &token=123ab
We create the "ad" (variable), which captures the address in loliscript:
PRINT <ADDRESS>
SET VAR "ad" "<ADDRESS>""ad=anything.com/anything &token=123ab
then
we capture the token
Parse:<ad>
Var / Cap name: tok1
left string: anything.com/anything & token =and the result is the variable tok1
tok1:123ab
-
@jorbeto
Why not usePARSE "<ADDRESS>" LR "" "" -> VAR ""
?????
Print before parse for what ?Just
REQUEST GET "https://example.com" HEADER "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" HEADER "Pragma: no-cache" HEADER "Accept: */*" PARSE "<ADDRESS>" LR "token=" "" -> VAR "token"
<ADDRESS>not <address>