mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
Compare commits
2
Commits
hellohao-dev
...
20230320
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57b6c4ae72 | ||
|
|
538482a73b |
@@ -104,7 +104,7 @@ public class ImgUrlUtil {
|
||||
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
|
||||
//设置超时间为3秒
|
||||
conn.setConnectTimeout(5*1000);
|
||||
//防止屏蔽程序抓取而返回403错误
|
||||
//防止屏蔽程序抓取而返回403错误 Referer
|
||||
conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
|
||||
|
||||
//得到输入流
|
||||
|
||||
Reference in New Issue
Block a user