const axios = require( 'axios');
async function a_request(url){
console.log(url)
try {
resp = await axios.get(url)
console.log(resp.status,resp.data.length)
return resp.data
} catch (err){
console.log (err.response.status)
return -1
}
}
async function requests(url){
rest = new URL(url)
ret = await a_request(url)
if ( ret != -1){
return ret
}
ret = await a_request( "https://gh-proxy.com/"+url)
if ( ret != -1){
return ret
}
ret = await a_request( "https://ghproxy.com/"+url)
if ( ret != -1){
return ret
}
ret = await a_request( "https://ghproxy.net/"+url)
if ( ret != -1){
return ret
}
}