Giter Club home page Giter Club logo

Comments (10)

magicmars35 avatar magicmars35 commented on July 30, 2024

They just added a challenge at the main page :
I believe all unofficial APIs are now down ...

`

<title>Just a moment...</title>

chat.openai.com

Checking if the site connection is secure

Enable JavaScript and cookies to continue
chat.openai.com needs to review the security of your connection before proceeding.
<script> (function(){ window._cf_chl_opt={ cvId: '2', cType: 'managed', cNounce: '35957', cRay: '77816379cc6722a3', cHash: '96ffa234eb3a409', cUPMDTk: "\/api\/auth\/session?__cf_chl_tk=mgs1BQ5KlKESXXXXXXXXXXXXXXXXXXXXXX794930-0-gaNycGzNEpE", cFPWv: 'b', cTTimeMs: '1000', cTplV: 4, cTplB: 'cf', cRq: { ru: 'aHR0cHM6Ly9jaGF0Lm9wZW5haS5jb2XXXXXXXXXXXXXXXXXXXXVzc2lvbg==', ra: 'TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXwNy4wLjAuMCBTYWZhcmkvNTM3LjM2IEVkZy8xMDcuMC4xNDE4LjYy', rm: 'R0VU', d: 'KufDIwHzPls+2diuK5QVcaCCerde9UWH7IgMBN3lwfsd4oaT0WhDZXXXXXXXXXXXXXXXXXXXXXXXXXXXeh4JDltOmIZAYn0hX2pJ2BYI4oM7MeEF7jCPkkJs+Y5qrXT0DJaXRxkPhUhkY5rAK7G6L8I613PwZ1T6ym5YF47zHtGV6mMJbwm2gL5TST9BcPTkhz5htm7TGMpAGTCiX3FBPjUDGDIJxM2QK80woSDLxfvTIGVRBSz9mnp97vY6dzUvSXv0Yz4w8g1qDsF7x8Z6bnCDdfRJCgGLKfZPd9IYr9xcga1/wcx5ZzbDcynC4NVym6h7P3dMrtXF+BzNSM3Cz69bxpixkd49MmhoKvix3O1T2WSeNPdg7y9+UR3zJtyDHv7J4LRIV9IqNfRVqpCrovM4nCLOm4uHVCaTa/cWsP2xaX0ieRA8ZvgVzrG+Kq5FoNeSSO1+vZmtmIDkewKUDtHhToQyh6wnaPZtYEJV5APKm4L5S3WATqV/JXLw3WMfewrxbGQt0ahaZdNEQCLJc3JtgQgih0gsirYXMWuGDW7Affr1d7NyEgtjEcCGUmenB+4f006I6Tu83jm9eus3CDssKiRW5h', t: 'MTY3MDcXXXXXXXXXXDgwMDA=', m: '6HExaW7cS4o262fnzyVoXXXXXXXXXXXXXXX8cNCgDbAsaoY=', i1: 'r0WsKCon3RXXXXXXXXXXZ15Q==', i2: 'gB0guPr9JXXXXXXXXXXX5Mw==', zh: 'iuyN59AGNgeBFFXXXXXXXXCyd1dJnIVFAc=', uh: 'r8ReuYYD4T8V2FXXXXXXXXXXLL7XD565cQk=', hh: 'foaWmAUHGGlVCZaNUJIHhxzxFNzSPNnVe6rJjiQw728=', } }; var trkjs = document.createElement('img'); trkjs.setAttribute('src', '/cdn-cgi/images/trace/managed/js/transparent.gif?ray=77816379cc6722a3'); trkjs.setAttribute('style', 'display: none'); document.body.appendChild(trkjs); var cpo = document.createElement('script'); cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/managed/v1?ray=77816379cc6722a3'; window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash; window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, -window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search; if (window.history && window.history.replaceState) { var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash; history.replaceState(null, null, "\/api\/auth\/session?__cf_chl_rt_tk=mgs1BQ5KlKESJXiyWb4j0yLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXycGzNEpE" + window._cf_chl_opt.cOgUHash); cpo.onload = function() { history.replaceState(null, null, ogU); }; } document.getElementsByTagName('head')[0].appendChild(cpo); }()); </script>
<div class="footer" role="contentinfo">
    <div class="footer-inner">
        <div class="clearfix diagnostic-wrapper">
            <div class="ray-id">Ray ID: <code>77816379cc6722a3</code></div>
        </div>
        <div class="text-center">Performance &amp; security by <a rel="noopener noreferrer" href="https://www.cloudflare.com?utm_source=challenge&utm_campaign=m" target="_blank">Cloudflare</a></div>
    </div>
</div>
`

from pychatgpt.

fffiloni avatar fffiloni commented on July 30, 2024

as reported here

It's to do with and their (new) cloudflare hCaptcha implementation. Once you pass the security check, the browser stores a cf_clearance cookie which has a 1-year expiration. If this cookie is missing, even if you have a valid session/access token you will need to pass the security check again before accessing the website.

from pychatgpt.

fffiloni avatar fffiloni commented on July 30, 2024

see also this issue to follow the ongoing discussions on solutions

from pychatgpt.

terry3041 avatar terry3041 commented on July 30, 2024

Hi. A temporary bypass using undetected_chromedriver is added to the new release v0.2.0.
This library now requires a Chrome installation. Please check and let me know if you have any questions.

from pychatgpt.

BooBooKittyFck avatar BooBooKittyFck commented on July 30, 2024

Hi. A temporary bypass using undetected_chromedriver is added to the new release v0.2.0. This library now requires a Chrome installation. Please check and let me know if you have any questions.

Works fine - only thing that would be lovely is when it would close the browser afterwards.
When i call it via my bot it let the browser stay open.

from pychatgpt.

terry3041 avatar terry3041 commented on July 30, 2024

Hi. A temporary bypass using undetected_chromedriver is added to the new release v0.2.0. This library now requires a Chrome installation. Please check and let me know if you have any questions.

Works fine - only thing that would be lovely is when it would close the browser afterwards. When i call it via my bot it let the browser stay open.

Unfortunately, the browser window is required as Cloudflare will detect headless browser and the bypass will not work.

from pychatgpt.

BooBooKittyFck avatar BooBooKittyFck commented on July 30, 2024

Hi. A temporary bypass using undetected_chromedriver is added to the new release v0.2.0. This library now requires a Chrome installation. Please check and let me know if you have any questions.

Works fine - only thing that would be lovely is when it would close the browser afterwards. When i call it via my bot it let the browser stay open.

Unfortunately, the browser window is required as Cloudflare will detect headless browser and the bypass will not work.

I mean after the whole process is finished - the browser still stays open i mean something like self.driver.quit() after everything is done

from pychatgpt.

terry3041 avatar terry3041 commented on July 30, 2024

I mean after the whole process is finished - the browser still stays open i mean something like self.driver.quit() after everything is done

That is achievable. But as we are ensuring auth when using send_message(), it means that we are going to init a new browser instance every time. That may be a little bit time consuming.
But if you dont mind, I can change that in the code.

self.refresh_auth()

from pychatgpt.

BooBooKittyFck avatar BooBooKittyFck commented on July 30, 2024

I mean after the whole process is finished - the browser still stays open i mean something like self.driver.quit() after everything is done

That is achievable. But as we are ensuring auth every time when sending message, it means that we are going to init a new browser instance when using send_message(). That may be a little bit time consuming. But if you dont mind, I can change that in the code.

self.refresh_auth()

I just added self.driver.quit() in line 150 before it returns the msg - that will close the browser everytime and reopen a new session when i ask a new question ( actual use it in a discord bot )
Thanks alot for supporting terry!

from pychatgpt.

terry3041 avatar terry3041 commented on July 30, 2024

I just added self.driver.quit() in line 150 before it returns the msg - that will close the browser everytime and reopen a new session when i ask a new question ( actual use it in a discord bot ) Thanks alot for supporting terry!

I have pushed version v0.2.3 to reduce the browser pop-up frequency. Please have a look and let me know if you have any questions.

from pychatgpt.

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.