Code Monkey home page Code Monkey logo

Comments (13)

arivera12 avatar arivera12 commented on August 15, 2024

@sigaloid did you ever make this work properly?

I am getting 403 atm.

I used http client instead, then tried out with webclient and same result with both clients...

I created my own branch for this

https://github.com/sigaloid/LibreTranslate.Net/tree/Development-arivera12

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

I run the project as-is. It seems that maybe we need the api key?
image

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

I will try downloading the other project and create my own local server and then try again.

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

I was able to pull supported cultures but the translate method seems to need the api key.
image

from libretranslate.net.

sigaloid avatar sigaloid commented on August 15, 2024

A specific header needs to be added to the web request in order for this library to act as though it is in the web browser. However, this is bypassing the restrictions the server administrator added (evidently the server load justified the need to lock down the API). In addition, there are still heavy rate limits (see below).

For now, we can add the api_key to the constructor
image; this was on my to-do list anyway. This way, legitimate users to the main server with a valid API key can make their requests.

See these github issues: LibreTranslate/LibreTranslate#85 LibreTranslate/LibreTranslate#82

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

So basically just adding api_key with random value to the request post bypass security?

from libretranslate.net.

sigaloid avatar sigaloid commented on August 15, 2024

No, you need an API key from UAV4GEO in order to use it. However, being on the actual website bypasses this because of the headers sent along. I'm fairly certain @uav4geo does not want libraries or developers bypassing this, so the site could be used by humans and only paying developers would use the API.

However we do need an API key to test with once we try to add API functionality. I will try to message him soon. Finals are ending soon so hope to have the free time to add it

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

Well, in that case we need a temp api key to test it out.

I will be waiting for this then, I have everything almost done, just need to test the translate api.

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

I created the nuget package, refactored source code, updated readme, just waiting to test the translate method.

I created the nuget package assuming that we just need to provide the api key to the translate method.

https://www.nuget.org/packages/LibreTranslate.Net

from libretranslate.net.

sigaloid avatar sigaloid commented on August 15, 2024

I believe I can test this out myself since the API functionality is built into libretranslate. Testing soon

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

Check out my branch for testing

from libretranslate.net.

sigaloid avatar sigaloid commented on August 15, 2024

Well my VPS is out of space and I can't host any more docker containers 😞 As long as it matches the specs here it should work though.

from libretranslate.net.

arivera12 avatar arivera12 commented on August 15, 2024

Closing this a moving what is left here: #7

from libretranslate.net.

Related Issues (9)

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.