what-the-bank/sources/o/pFa.java

29 lines
828 B
Java

package o;
import android.text.TextUtils;
import android.webkit.URLUtil;
import java.net.MalformedURLException;
import java.net.URL;
/* loaded from: classes3.dex */
public final class pFa {
public static String a(String str) {
if (TextUtils.isEmpty(str)) {
ZFe.d("url is null");
return str;
}
try {
if (!URLUtil.isNetworkUrl(str)) {
ZFe.a("url don't starts with http or https");
return "";
}
return new URL(str.replaceAll("[\\\\#]", "/")).getHost();
} catch (MalformedURLException e) {
StringBuilder sb = new StringBuilder("getHostByURI error MalformedURLException : ");
sb.append(e.getMessage());
ZFe.a(sb.toString());
return "";
}
}
}