Git Product home page Git Product logo

baidu-ocr-fanyi's Introduction

baidu-OCR-fanyi

Python 日记 -- 百度 OCR 翻译


百度 OCR 翻译

效果展示


准备工作

  1. 登录 / 注册 百度账号

  2. 创建 通用场景OCR应用归属 选择 个人应用名称应用描述 自定义

  3. 填完以上信息后,点击 立即创建 (注意要实名认证)

  4. 此时,应用列表 会出现 刚创建好的应用 ,分别把 AppIDAPI KeySecret Key 记录好 等下用


使用教程

  • 打开 new_OCR\dist\OCR.ini 文件,把在 准备工作 获取的 AppIDAPI KeySecret Key 对应填入 , 运行exe文件 即可
[aip]
APP_ID = 
API_KEY = 
SECRET_KEY = 

  • 如出现闪退 / 想换成自己的 , 请 / 可 更换以下内容
[config]
User-Agent = 

Cookie = 

bv = 
  • 方法如下
  1. F12 打开 开发者工具 ,选择 Network , 然后选择 XHR

  2. 翻译框 输入任意 文字页面 会出现 translate_ (如有多个选最新)

  3. 点击 translate_ ,在 Headers 页面可以找到 User-AgentCookie ,在 Payload 页面可以找到bv (火狐浏览器的 bv 在请求页面)

  4. 把找到的内容 替换 ini 文件内容重新运行 即可

  5. 如不清楚文字描述可按 如图 1 所示 步骤 即可

图 1


补充

github 开源:https://github.com/12thstan/baidu-OCR-fanyi

gitee 开源:https://gitee.com/c12th/baidu-OCR-fanyi

原文:https://blog.c12th.cn/archives/7.html

baidu-ocr-fanyi's People

Contributors

12thstan avatar

Watchers

 avatar

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.