×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

我是用cygwin里自带的wget, 没有问题啊

$ wget http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del
--19:33:15-- http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del
=> `sdn.del'
Resolving www.treas.gov... 66.77.70.101
Connecting to www.treas.gov|66.77.70.101|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 604,270 (590K) [text/plain]

100%[====================================>] 604,270 175.32K/s ETA 00:00

19:33:19 (170.46 KB/s) - `sdn.del' saved [604270/604270]


604270 Jan 28 13:54 sdn.del
Report

Replies, comments and Discussions:

  • 工作学习 / 学科技术讨论 / 我想用SCRIPT自动从网站下载一个FILE存到LOCAL C:DRIVE,请问怎么实现,已经试了WGET, 不行。The link to the file I want to download is inside. Thanks much!
    http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del
    • 我是用.net的,用io函数stream直接写磁盘不行么。当然如果你是web程序估计不行,本地都有保护程序,限制浏览器自动下载
      • 只是一个小utility program., 有没有简单一点的, 用batch file 就最好了. 谢了
    • Check .net WebClient class. I believe there are similar classes in java or PHP.
      • 只是一个小utility program, 有没有简单一点的, 用batch file 就最好了. 谢谢
        • No. It's not simple function.
    • 我是用cygwin里自带的wget, 没有问题啊
      $ wget http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del
      --19:33:15-- http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del
      => `sdn.del'
      Resolving www.treas.gov... 66.77.70.101
      Connecting to www.treas.gov|66.77.70.101|:80... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 604,270 (590K) [text/plain]

      100%[====================================>] 604,270 175.32K/s ETA 00:00

      19:33:19 (170.46 KB/s) - `sdn.del' saved [604270/604270]


      604270 Jan 28 13:54 sdn.del
    • 你什么wget啊,什么错误信息说来听听?
      • Just tried with VPN in, still connect connect. Our company using proxy server for http connection. Looks like this is the problem. let me google to see if I can find using wget through proxy...
        c:\wget http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del
        --2009-01-28 18:23:46-- http://www.treas.gov/offices/enforcement/ofac/sdn/delim
        it/sdn.del
        Resolving www.treas.gov... 66.77.70.101
        Connecting to www.treas.gov|66.77.70.101|:80... failed: Connection timed out.
        Retrying.

        --2009-01-28 18:24:09-- (try: 2) http://www.treas.gov/offices/enforcement/ofac
        /sdn/delimit/sdn.del
        Connecting to www.treas.gov|66.77.70.101|:80... failed: Connection timed out.
        Retrying.
        • More detailed errors, How to proxy authentication problem?
          wget http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del
          --2009-01-28 18:39:31-- http://www.treas.gov/offices/enforcement/ofac/sdn/delim
          it/sdn.del
          Resolving webproxy.corp.xxxx.com... 10.32.55.26
          Connecting to webproxy.corp.xxxx.com|10.32.55.26|:8080... connected.
          Proxy request sent, awaiting response... 407 Proxy Authentication Required ( The
          ISA Server requires authorization to fulfill the request. Access to the Web Pro
          xy filter is denied. )
          2009-01-28 18:39:35 ERROR 407: Proxy Authentication Required ( The ISA Server re
          quires authorization to fulfill the request. Access to the Web Proxy filter is d
          enied. ).
    • 谢谢各位, 看来是我下载的wget有问题或者是公司Firewall block了, 重新从sourceforge上下了一个就可以了. 明天到公司再试一试, 如果不行还得想其他办法. 再次谢谢大家了!!
      • firewall 如果block文件下载的话你是没办法,如果是公司内部proxy的话这样 wget --no-cache --proxy-user=yourproxyuserid --proxy-password=yourproxypassword theurlyouwant
        记得在.wgetrc里放上
        ‘http_proxy = URL’
        ‘https_proxy = URL’
        ‘ftp_proxy = URL’
        ‘no_proxy = string’
    • Write a Java program, make URLConnection, get urlConn.getInputStream (), read line by line, save to local text file. EASY. If there is a proxy, use: urlConn = url.openConnection(myproxy)
      • 老牛写java写上瘾了么?
        • Writing a management program for web session control. Some vars are session-persistent, some are request-persistent. Do you think storing those vars and attributes into database, and initiate them during session startup is a good idea?
          • no idea, u need a database for this? I am kind of surprised, I would just read it from a flat session file when session is up and load the request-persistent session in the running process user space. .
            I don't actually know what you are referring to anyway
            • flat file is ok, some conf files are xml files anyway, but I want to have the ability to control/monitor vars through remote connection, and have more potential to log precisely about what happens about id/session/request.
              I can save var definition in a file and then use admin session to dynamically create/modify vars in a hashmap, ...... another way to go when web app demands some off-line capacity.
      • thanks for the input. Since our company use MS ISA proxy server, which uses a proprietary NTLM protocol which only allows MS product to connect ISA. So I figure out a lazy way to do it.
        c:>iexplore http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.del

        after that, just copy the sdn.del from temporary internet file folder to my c drive. theoretically it should work, will see. :)
    • Here is the link to how to use NTLMAPS to solve the MS ISA authentication problem. Post here just in case someone else comes across same situation. Then I use wget to grab the file. Thanks all!