使用 node-webkit 下载文件时出错(URL 中的 "chrome-extension")
Error on downloading file with node-webkit ( "chrome-extension" in the URL)
我正在尝试使用 node-webkit 制作类似 pdf 下载器的东西。
我有一个 URL 的输入标签和一些验证码。
到目前为止它工作得很好..但是当我尝试像这样放置 URL
(chrome 扩展名://oemmndcbldboiebfnladdacbdfmadadm/http://www.semantikon.com/StealThisBookbyAbbieHoffman.pdf)
node web-kit 给我这个错误:
message: "Protocol "chrome-extension:" not supported. Expected "http:"."
我正在使用这个正则表达式
/(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?\.pdf$/gi;
谢谢
既然有人回答了,我会自己做,我做了一些不太好的事情,但现在可以用了..我放了一些函数来确保 url 以 http 或 https 开头,但是在这种情况下,使用必须删除 url 中不需要的部分,如上例
chrome extension://oemmndcbldboiebfnladdacbdfmadadm/http://www.semantikon.com/StealThisBookbyAbbieHoffman.pdf
我正在尝试使用 node-webkit 制作类似 pdf 下载器的东西。 我有一个 URL 的输入标签和一些验证码。 到目前为止它工作得很好..但是当我尝试像这样放置 URL (chrome 扩展名://oemmndcbldboiebfnladdacbdfmadadm/http://www.semantikon.com/StealThisBookbyAbbieHoffman.pdf) node web-kit 给我这个错误:
message: "Protocol "chrome-extension:" not supported. Expected "http:"."
我正在使用这个正则表达式
/(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?\.pdf$/gi;
谢谢
既然有人回答了,我会自己做,我做了一些不太好的事情,但现在可以用了..我放了一些函数来确保 url 以 http 或 https 开头,但是在这种情况下,使用必须删除 url 中不需要的部分,如上例
chrome extension://oemmndcbldboiebfnladdacbdfmadadm/http://www.semantikon.com/StealThisBookbyAbbieHoffman.pdf