Find active link

Hello
my question is
there is a link example(https://site303 com) change 303 to 304 Check if the link is working and if it is, it should show the link in the webview.and this process should continue until you find the right link
How do i have to do this or is there any code block

Use index method.

Initialise one global variable with zero.

During screen init or on button click set this index to get index +1 or set index to 1.

Meanwhile add this numbers as a list in a global variable.

Set web 1 URL to set web url to URL + select list item from list (number list ) index (get global index)
call Web1.get

When web1 got text
Use rules to get response content or response code.

If it not matches
Set global index to get index +1
Set web url to (use same method) (prefer procedure)

1 Like

Is there an example block code?

If possible just share us some URL

https://dizipal304.com/
https://dizipal305.com/
https://dizipal306.com/
https://dizipal307.com/
https://dizipal308.com/
https://dizipal309.com/
https://dizipal310.com/
https://dizipal311.com/
https://dizipal312.com/
https://dizipal313.com/
https://dizipal314.com/
https://dizipal315.com/

Try like this this…

But if site got text then procedure will get stopped. Else it will continue to test one by one

I tested with above code and found all the five are not working, I mean site not the logic :smile:

1 Like

thanks MAN

1 Like

Is there Aia File
i am getting error

Why man? Just set like that and try. What you are getting? I am in mobile and created above blocks in one of another’s project so unable to share AIA. Also no need of aia

What is the error?

I tried active link but it said no link

Post an active link please

I solved the problem, but the akrif link does not open in webwiev
or how can i transfer the link to webview

See the logic… if it is valid link you will get response code 200 in web got text, where as if the link says error 1101 you will get response in when error occured…

Among the list based in the above logic if the link is valid then in web got text just use one if then condition

If get response code = 200
Set web view to go to URL get URL

Very simple.

If the link is not valid then error occurred will get trigger and loop will go on untill web got text get trigger

I fixed the problem

1 Like

hey man how do i add this txt file to initialize global id
the file is attached
dizilink.txt (6.8 KB)

CheckLink.aia (5.3 KB)

Save txt as csv, upload to assets and use file component to read it. When file got text assign values to global variable using list from csv table

oww man I’m trying right away

I’m trying right away