mitx
V2EX  ›  问与答

如何稳定访问谷歌翻译接口

  •  
  •   mitx · Oct 21, 2022 · 3484 views
    This topic created in 1482 days ago, the information mentioned may be changed or developed.

    前段时间谷歌翻译退出国内,看到的方法处理代理基本上都是修改 hosts 。

    我用的谷歌翻译接口也用修改 hosts 方法,最近发现这个方法有一大半的请求其实是 404 。

    https://i.imgur.com/l3pJA7h.png

    10 次请求有 4 次成功 6 次 404 (大概)

    失败的:

    https://i.imgur.com/IjEpYf3.png

    成功的:

    https://i.imgur.com/nHcRUco.png

    有谁知道里面的逻辑吗?还有没有其他解决方案呢?

    20 replies  •  2022-10-22 19:35:57 +08:00
    ThisDay
    ThisDay
    Oct 21, 2022
    1
    同问,我也刚发现 hosts 现在会概率失败
    perfectlife
    perfectlife
    Oct 21, 2022
    2
    同求
    qjbcnrs
    qjbcnrs
    Oct 21, 2022
    3
    +1
    lucifer69
    lucifer69
    Oct 21, 2022
    4
    *.translate.googleapis.com 加到规则走代理可以使用
    mitx
    mitx
    OP
    Oct 21, 2022
    5
    *处理代理 -> 除了代理
    estk
    estk
    Oct 21, 2022 via Android
    6
    谷歌有免费接口?
    paradoxs
    paradoxs
    Oct 21, 2022
    7
    不用谷歌翻译不就行了。。。。
    eason1874
    eason1874
    Oct 21, 2022
    8
    只能走代理

    gstatic 和 apis 虽然在国内有节点,但是国内节点是会主动屏蔽非国内内容的,就像这个翻译服务这样 404
    0o0O0o0O0o
    0o0O0o0O0o
    Oct 21, 2022 via iPhone
    9
    不想走代理,那也得走代理。
    bollld607
    bollld607
    Oct 21, 2022
    10
    Google 服务器的 shadowban ,从前天开始就是这样了

    ![googletranslate404]( https://files.catbox.moe/wzqqxp.png)
    XIU2
    XIU2
    Oct 21, 2022
    11
    @paradoxs 楼主说的是 Chrome 浏览器自带的全页翻译功能,调用的这个翻译接口 API
    mitx
    mitx
    OP
    Oct 21, 2022
    12
    @estk chrome 的插件有
    mitx
    mitx
    OP
    Oct 21, 2022
    13
    @eason1874 但是有的时候就能正常返回
    Aaron325
    Aaron325
    Oct 21, 2022 via iPhone
    14
    代理和反代?
    wbrobot
    wbrobot
    Oct 21, 2022
    15
    国内的翻译 api:
    腾讯云有每个月 400 万字符的免费额度
    抖音的火山引擎有 200 万字符的免费额度
    bobryjosin
    bobryjosin
    Oct 22, 2022 via iPhone
    16
    都出来了,挂代理也不难,要么选择第三方反代的 api ,要么就放弃 Google 翻译
    Sakura0Tears
    Sakura0Tears
    Oct 22, 2022
    17
    同求一个办法啊哟
    zooo
    zooo
    Oct 22, 2022
    18
    同求
    xwcs
    xwcs
    Oct 22, 2022
    19
    昨天开始好像改 hosts 的方法也不好使了,chrome 内置的翻译没法用了
    systemcall
    systemcall
    Oct 22, 2022
    20
    要是是自己的设备,就开代理
    要是是要做什么项目,你自己做个反代,一般也没什么人来查。不过最好还是做一下过滤,怕出现一些政治敏感的东西。而且你要预防那个反代被别人用了,刷一些流量还是小事
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1273 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 58ms · UTC 23:51 · PVG 07:51 · LAX 15:51 · JFK 18:51
    ♥ Do have faith in what you're doing.