Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
145 views
in Technique[技术] by (71.8m points)

html - How to use java to test if page is missing. Either in Default Java or JSOUP. Or some similar library

So if I have this webpage which is clearly missing.

http://zjcdn.mangafox.me/store/manga/16627/114.5/compressed/s001.jpg

What's the quickest way to connect to it and know if it is missing. Hopefully in the form of some exception or checking a returned value.

文件不存在 translates to the page is missing.

I was thinking along the lines of HttpStatusExceptions but I couldn't get that to work when I tried to connect with JSOUP.

Any help would be greatly appreciated.

question from:https://stackoverflow.com/questions/65913829/how-to-use-java-to-test-if-page-is-missing-either-in-default-java-or-jsoup-or

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...