Git Product home page Git Product logo

Comments (7)

phaeton1199 avatar phaeton1199 commented on May 24, 2024

@usr741852 May I ask you how you pass the cookies in set_all(), please? I haven't been able to add any cookie using this function, even making the changes that you stated.

from undetected-chromedriver.

usr741852 avatar usr741852 commented on May 24, 2024

@usr741852 May I ask you how you pass the cookies in set_all(), please? I haven't been able to add any cookie using this function, even making the changes that you stated.

I just commented out the line:

#cookies = await connection.send(cdp.storage.get_cookies())

then cookies would work. If that is NOT working for you, are you sure you are passing them incorrectly?

from undetected-chromedriver.

marioeivissa avatar marioeivissa commented on May 24, 2024

anybody can help putting here how use nodriver to get cookies? for example i have this with undetected chromedriver

def do_login(username, password):
options = uc.ChromeOptions()
options.add_argument("--headless")
driver = uc.Chrome(options=options)
driver.get("https://account.xxxxxxxxxxxxxxxxxxxxxxxF")
cookie = driver.get_cookie("reese84")
reese84 = cookie['value']
driver.quit()

how can i use with nondriver????

from undetected-chromedriver.

marioeivissa avatar marioeivissa commented on May 24, 2024

where can i see this command??cookies = await connection.send(cdp.storage.get_cookies()) i dont see it where is it

from undetected-chromedriver.

ultrafunkamsterdam avatar ultrafunkamsterdam commented on May 24, 2024

don't spam the issue tracker. this is not an issue.

cookies =await tab.send(cdp.storage.get_cookies())

await tab.send(cdp.storage.set_cookies(cookies))

from undetected-chromedriver.

marioeivissa avatar marioeivissa commented on May 24, 2024

thank for reply mate, but i dont understand how put this command in the proof i sent you, using nodriver, can you complete a little bit, and if i want a cookie not all cookies?? and can you show modules tu use, thanks in advance

i have this await browser.cookies.save(file="cookie.json") to copy cookies en a json

from undetected-chromedriver.

ultrafunkamsterdam avatar ultrafunkamsterdam commented on May 24, 2024

await browser.cookies.load(file="cookie.json")

cookies =await tab.send(cdp.storage.get_cookies())

get_cookies returns a list of cdp.network.Cookie objects.

You can mutate the list, remove and add new ones then to set them just pass that list of cookies to set_cookies

If you don't know how this works you're in the wrong place. And I'd advise a python refresher

from undetected-chromedriver.

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.