Advertisement
aliakbarbeda2

url 404 check Googl script

Nov 7th, 2022
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. //mengatasi akun deaktif error url
  2. function check_url(url) {
  3. try {
  4. response = UrlFetchApp.fetch(url)
  5. if(response.getResponseCode() == 200 ) {
  6. console.log('['+x+'] = 200 - kirim "'+AsoePengumuman+'" ke '+id[x]+'')
  7. return true
  8. } else if(response.getResponseCode() == 401 ) {
  9. console.log('401')
  10. return "401"
  11. }
  12. }
  13. catch(err) {
  14.  
  15. return "Not Valid"
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement