Giter Club home page Giter Club logo

Comments (6)

fjqingyou avatar fjqingyou commented on August 17, 2024

我尝试过了。也成功了。但是不合适

因为我自己试用了几分钟,报错了。查看错误原因,被谷歌翻译判定为频繁访问翻译的攻击。。。无奈的是。字幕是一句话翻译一次,两句话之间的间隔可能很短,,持续几次就被谷歌翻译拦截掉,

哪怕我设置了每一句翻译后间隔4秒钟才翻译下一句。。大约翻译了40句左右。。又封禁了。。。

经常被封禁了翻译。。所以我暂时放弃了谷歌翻译了

from potplayer_subtitle_translate_baidu.

fjqingyou avatar fjqingyou commented on August 17, 2024

出错时,服务器不给json内容了。会得到下面的结果。。你可以复制保存问html文件,用浏览器查看它

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="initial-scale=1"><title>https://translate.googleapis.com/translate_a/single?client=gtx&amp;sl=auto&amp;tl=ja&amp;dt=t&amp;q=%E6%84%8F%E5%91%B3%E3%81%8C%E7%84%A1%E3%81%84</title></head>
<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px;" onload="e=document.getElementById('captcha');if(e){e.focus();}">
<div style="max-width:400px;">
<hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br>
<div style="font-size:13px;">
Our systems have detected unusual traffic from your computer network.  Please try your request again later.  <a href="#" onclick="document.getElementById('infoDiv0').style.display='block';">Why did this happen?</a><br><br>
<div id="infoDiv0" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">
This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href="//www.google.com/policies/terms/">Terms of Service</a>. The block will expire shortly after those requests stop.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests.  If you share your network connection, ask your administrator for help &mdash; a different computer using the same IP address may be responsible.  <a href="//support.google.com/websearch/answer/86640">Learn more</a><br><br>Sometimes you may see this page if you are using advanced terms that robots are known to use, or sending requests very quickly.
</div><br>

IP address: 这里是IP地址,我就抹除了<br>Time: 2020-02-14T09:26:39Z<br>URL: https://translate.googleapis.com/translate_a/single?client=gtx&amp;sl=auto&amp;tl=ja&amp;dt=t&amp;q=%E6%84%8F%E5%91%B3%E3%81%8C%E7%84%A1%E3%81%84<br>
</div>
</div>
</body>
</html>

from potplayer_subtitle_translate_baidu.

fjqingyou avatar fjqingyou commented on August 17, 2024

@aclihub 想到了可变json可能,测试后修改方案后可行了。为了统一管理,发布成了新git。
地址是 https://github.com/fjqingyou/PotPlayer_Subtitle_Translate_Google_Single

from potplayer_subtitle_translate_baidu.

fjqingyou avatar fjqingyou commented on August 17, 2024

我去。。。。抱歉抱歉,一不小心看错了你要表达的东东了。。

汗。。百度方面之前没注意到有类似功能的消息。。。

from potplayer_subtitle_translate_baidu.

BackMountainDevil avatar BackMountainDevil commented on August 17, 2024

goole 那个url下线了

from potplayer_subtitle_translate_baidu.

mbdwwlc2020 avatar mbdwwlc2020 commented on August 17, 2024

能否开发一个有道翻译的版本的potplayer翻译引擎呢?

from potplayer_subtitle_translate_baidu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.