Help using fetch command!

Hi Mikrotik Team

Can i use Fetch command to download this page (http://www.cool-proxy.net/index.php?action=anonymous-proxy-list&sort=response_time_average&sort-type=asc) to Mikrotik files section as i can use it later in some scripts

i tried to do this but with no success can somebody help in this please?

Works for me

[admin@dzeltenais_burkaans] > /tool fetch mode=http url=“http://www.cool-proxy.net
/index.php?action=anonymous-proxy-list&sort=response_time_average&sort-type=asc”
status: finished

How big is the file when you get it downloaded? It looked much larger than 4095 bytes. If so, I think you may be disappointed when you try to access it with a script. Or has that limit changed lately?

It is not changed, limit is still 4098bytes

I found it is 4095 bytes by experiment, but who’s counting? :slight_smile:
The download will work. The script access will fail. :frowning:

Thanks a lot maybe i was doing something wrong

in your opinion there is no way to get data from this file after download?

File size is 14115 bytes so no you can’t get contents from the script.

I want to get the first proxy in the page to use it as parent proxy

every time i think in new way to make what i want i found something is stopping me

Can i save a part of the page to fit the Max limit size?
Can i force fetch to download file via proxy ??
Can i make Mikrotik tTest parent proxy??
any other idea

i want to make script make Mikrotik Router smart in selecting good working parent proxy.

I think I would try using my Apache server to download the file and parse out all the proxy ips with a shell script or C program. Then put the resulting file (much smaller now) into the server’s web folder. Then fetch that file with the router.

HEY! Nobody said it would be simple! :smiley:

:slight_smile: yes really it is not simple

Have you considered doing it the “caveman” way? Put the ips in a text file and upload it into the router. Those ips probably don’t change that often. Then use the text file contents to choose an operating proxy with a script.

Or after file is parsed set proxy IP directly to Router with API :smiley:

I like that! But how many people on this forum could do that besides you and me? (“you” meaning the MT staff and the karma list)

you got a good ideas.

but i was intending to do this in automatic way with no human entry. or if i could find another site it may work