translate-shell 不能用, 404 错误了 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cmichael
V2EX    macOS

translate-shell 不能用, 404 错误了

  •  
  •   cmichael 2022 年 10 月 24 日 1332 次点击
    这是一个创建于 1281 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 Terminal 输入 trans good ,返回: [ERROR] Google returned an error response. HTTP status code: 404 [ERROR] Other HTTP error

    用路由器梯子和 export 都试过,还是不行,以前都不用梯子都行的。。。

    9 条回复    2022-11-03 08:41:22 +08:00
    neiltroyer849
        1
    neiltroyer849  
       2022 年 10 月 24 日 via iPad
    google 翻译不是不久前才宣布撤出中国了吗
    gesse
        2
    gesse  
       2022 年 10 月 24 日
    现在国内的服务器是都不能用了吧

    以前还可以通过 hosts 文件来用。
    FanYD
        3
    FanYD  
       2022 年 10 月 24 日
    之前不用梯子也可以,现在用梯子才行。export http_proxy=http://127.0.0.1:8001;export https_proxy=http://127.0.0.1:8001; 会影响 git 内网代码拉取。
    cmichael
        4
    cmichael  
    OP
       2022 年 10 月 24 日
    @FanYD 我改的是 vi ~/.zshrc ,curl ipinfo.io 显示已经是到国外服务器了,但是 trans 还是 404 错误,你试过吗?
    FanYD
        5
    FanYD  
       2022 年 10 月 24 日
    @cmichael 今天刚试的可以,我不 export ,curl ipinfo.io 也是显示国外服务器,你改完.zshrc 后 source 了吗?
    cmichael
        6
    cmichael  
    OP
       2022 年 10 月 31 日
    @FanYD 我这样弄的,不行:
    $ vim ~/.zshrc
    # proxy
    proxy () {
    export http_proxy="http://127.0.0.1:60879"
    export https_proxy=$http_proxy
    export socks5_proxy="socks5://127.0.0.1:60879"
    echo "HTTP Proxy on"
    }

    # noproxy
    noproxy () {
    unset http_proxy
    unset https_proxy
    echo "HTTP Proxy off"
    }

    $ source ~/.zshrc
    FanYD
        7
    FanYD  
       2022 年 11 月 2 日
    @cmichael echo $http_proxy 试一下,看看环境变量是否设置成功
    FanYD
        8
    FanYD  
       2022 年 11 月 2 日
    @cmichael 我是这样设置的
    alias wpon='export http_proxy=http://127.0.0.1:8001;export https_proxy=http://127.0.0.1:8001;'
    alias wpoff='unset http_proxy;unset https_proxy;'
    cmichael
        9
    cmichael  
    OP
       2022 年 11 月 3 日
    @FanYD 用了你的,echo $http_proxy 设置成功的,但是还是不行

    wpon 时:应该是正常能翻的,curl ipinfo.io 显示已经是到国外服务器了,但我用`trans good` 还是返回:
    [ERROR] Null response.
    [ERROR] Oops! Something went wrong and I can't translate it for you :(

    wpoff 时,返回:
    [ERROR] Google returned an error response. HTTP status code: 404
    [ERROR] Other HTTP error
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     973 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 44ms UTC 18:19 PVG 02:19 LAX 11:19 JFK 14:19
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86