mirror of
https://github.com/fengxxc/wechatmp2markdown.git
synced 2026-02-24 07:40:56 +08:00
v1.1.2
fix: 校验参数,解析url出错时不退出主线程
This commit is contained in:
@@ -196,7 +196,7 @@ func ParseFromHTMLFile(filepath string, imagePolicy ImagePolicy) Article {
|
||||
func ParseFromURL(url string, imagePolicy ImagePolicy) Article {
|
||||
res, err := http.Get(url)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
defer res.Body.Close()
|
||||
if res.StatusCode != 200 {
|
||||
|
||||
Reference in New Issue
Block a user