Commit Graph

42 Commits

Author SHA1 Message Date
UltrafunkAmsterdam 2b035b4ea1 compatible with selenium 4.10.
also removed service_args, service_creationflags, service_log_path from constructor. added find_elements_recursive helper function
2023-06-12 11:30:57 +02:00
UltrafunkAmsterdam c12fcfc0a8 Oh yes, do wanna rockin' with the best
--------------------

https://youtu.be/kMjhrh_XDWk?t=48

--------------------

Big update! be careful as it -potentially- could break your code.

- rewritten the anti-detection mechanism
  instead of removing and renaming variables, we just keep them, but prevent them from being injected in the first place

- rewritten the file naming, to prevent ending up with 1000 of {randomstring}_chromedriver.exe 's
  instead it is just called undetected_chromedriver.exe

- cleanup
  removed compat,v2 files and tests folder
2023-02-04 22:02:46 +01:00
UltrafunkAmsterdam 07abe814a6 more refactoring; fix bug that browser stays opened when script exits 2022-12-26 01:48:01 +01:00
Leon 5df8e00a5a
Merge pull request #643
Set a specific data_path for Patcher if the environment is AWS Lambda
2022-12-17 19:02:16 +00:00
Leon f13a0c1531
Update setup.py
include example file
2022-11-29 14:27:57 +01:00
AktanKasymaliev 5c98438725 path for aws lambda 2022-05-23 23:18:06 +06:00
sebdelsol 5c467b31eb fix unlinking at exit and fix driver creation file handling for multithread
Author:    UltrafunkAmsterdam<ultrafunkamsterdam@users.noreply.github.com>
Author:    sebdelsol <seb.morin@gmail.com>
2022-03-16 21:56:17 +01:00
Leon a4cc4a8b72
Update setup.py 2021-12-28 16:36:15 +01:00
brandfocus 8568c8946d Fix for Newlines are not allowed in setuptools Python 3.9.9 2021-12-26 11:33:37 +00:00
Leon 3bf4cdf7a9 3.1.2 - some 'bug' fixes 2021-12-24 15:39:16 +01:00
Leon 403b491e76
Update setup.py 2021-12-22 15:15:55 +01:00
Leon 6fbd50ef21
Update setup.py 2021-12-22 15:12:54 +01:00
UltrafunkAmsterdam b60820a600 3.1.0rc1
-----------
  this version is for test purposes only and contains breaking changes
  -----------

  - v2 is now the "main/default" module. usage:

        import undetected_chromedriver as uc
        driver = uc.Chrome()
        driver.get('https://nowsecure.nl')

  - The above is the README for this version. or use the regular instructions, but
    skip the `with` black magic and skip references to v2.
  - v1 moved to _compat for now.
  - fixed wrong dependancies
  - ~~~~ added "new" anti-detection mechanic ~~~~

  - the above ^^ makes all recent changes and additions obsolete
  - Removed ChromeOptions black magic to fix compatiblity issues

  - restored .get() to (near) original.
       - most changes from 3.0.4 to 3.0.6 are obsolete, as t
       - no `with` statements needed anymore, although it will still
         work for the sake of backward-compatibility.
       - no sleeps, stop-start-sessions, delays, or async cdp black magic!
       - this will solve a lot of other "issues" as well.
  - test success to date: 100%
  - just to mention it another time, since some people have hard time reading:
    headless is still WIP. Raising issues is needless
2021-12-16 05:53:41 +01:00
Leon ebafbe1db6
3.0.0 (#180)
*3.0.0
added lots of features and bugfixes

- You can now subscribe to Chrome Devtools Protocol Events like networking.
- splitted the project up in seperate modules now
- fixed locale (accept-language)
- you can enter your user-data-folder as property of
    ChromeOptions() now.
- The ChromeOptions had a makeover, and i took the one from alpha 4,
    people having troubles with mobile emulation and other bullshit,
    can try again now.
- fixed the logic where sometimes options did not
    respect the given values
- for headless (though still not supperted for undetectability),
    added some real cool features which need to be set in
    the options object):

    defaults:
    emulate_touch = True
    mock_permissions = True  # headless had notificationpermissions
                                setup in a distinguisable way.
    mock_chrome_global = False
    mock_canvas_fp = True  # patch fingerprint

EXTENSIONS ARE NOT SUPPORTED BY CHROME IN HEADLESS MODE
YET. IF YOU WANT TO USE THEM, CREATE A PROFILE AND INSTALL
EXTENSIONS BY USING A REGULAR CHROME SESSION FIRST.
ALSO LOGIN TO GMAIL WHILE YOU'RE ON A GENUINE SESSION.

WHEN FINISHED, COPY THE USERDATA FOLDER OF CHROME TO SOME KNOWN
LOCATION (and make maye 2 copies?). BY HAVING GMAIL LOGGED IN
FIXES ALSO THE UNSAFE BROWSER MESSAGE FROM GOOGLE (AT LEAST FOR
ME IT WORKS)


* 2.2.2

* fixed a number of bugs
- specifying custom profile
- specifying custom binary path
- downloading, patching and storing now (if not explicity specified)
    happens in a writable folder, instead of the current working dir.

Committer: UltrafunkAmsterdam <UltrafunkAmsterdam@github>

* tidy up

* uncomment block

* - support for specifying and reusing the user profile folder.
    if a user-data-dir is specified, that folder will NOT be
    deleted on exit.
    example:
        options.add_argument('--user-data-dir=c:\\temp')

- uses a platform specific app data folder to store driver instead
    of the current workdir.

- impoved headless mode. fixed detection by notification perms.

- eliminates the "restore tabs" notification at startup

- added methods find_elements_by_text and find_element_by_text

- updated docs (partly)

-known issues:
    - extensions not running. this is due to the inner workings
        of chromedriver. still working on this.
    - driver window is not always closing along with a program exit.
    - MacOS: startup nag notifications. might be solved by
        re(using) a profile directory.

- known stuff:
    - some specific use cases, network conditions or behaviour
      can cause being detected.

* Squashed commit of the following:

commit 7ce8e7a236cbee770cb117145d4bf6dc245b936a
Author: ultrafunkamsterdam <info@blackhat-security.nl>
Date:   Fri Apr 30 18:22:39 2021 +0200

    readme change

commit f214dcf33f26f8b35616d7b61cf6dee656596c3f
Author: ultrafunkamsterdam <info@blackhat-security.nl>
Date:   Fri Apr 30 18:18:09 2021 +0200

    - make sure options cannot be reused as it will
        cause double and conflicting arguments to chrome



    - support for specifying and reusing the user profile folder.
        if a user-data-dir is specified, that folder will NOT be
        deleted on exit.
        example:
            options.add_argument('--user-data-dir=c:\\temp')

    - uses a platform specific app data folder to store driver instead
        of the current workdir.

    - impoved headless mode. fixed detection by notification perms.

    - eliminates the "restore tabs" notification at startup

    - added methods find_elements_by_text and find_element_by_text

    - updated docs (partly)

    -known issues:
        - extensions not running. this is due to the inner workings
            of chromedriver. still working on this.
        - driver window is not always closing along with a program exit.
        - MacOS: startup nag notifications. might be solved by
            re(using) a profile directory.

    - known stuff:
        - some specific use cases, network conditions or behaviour
          can cause being detected.
2021-05-24 10:26:02 +02:00
Leon bc30d7623f
2.2.6 - hodl your breath (#161)
* 2.2.2

* fixed a number of bugs
- specifying custom profile
- specifying custom binary path
- downloading, patching and storing now (if not explicity specified)
    happens in a writable folder, instead of the current working dir.

Committer: UltrafunkAmsterdam <UltrafunkAmsterdam@github>

* tidy up

* uncomment block

* - support for specifying and reusing the user profile folder.
    if a user-data-dir is specified, that folder will NOT be
    deleted on exit.
    example:
        options.add_argument('--user-data-dir=c:\\temp')

- uses a platform specific app data folder to store driver instead
    of the current workdir.

- impoved headless mode. fixed detection by notification perms.

- eliminates the "restore tabs" notification at startup

- added methods find_elements_by_text and find_element_by_text

- updated docs (partly)

-known issues:
    - extensions not running. this is due to the inner workings
        of chromedriver. still working on this.
    - driver window is not always closing along with a program exit.
    - MacOS: startup nag notifications. might be solved by
        re(using) a profile directory.

- known stuff:
    - some specific use cases, network conditions or behaviour
      can cause being detected.

* Squashed commit of the following:

commit 7ce8e7a236cbee770cb117145d4bf6dc245b936a
Author: ultrafunkamsterdam <info@blackhat-security.nl>
Date:   Fri Apr 30 18:22:39 2021 +0200

    readme change

commit f214dcf33f26f8b35616d7b61cf6dee656596c3f
Author: ultrafunkamsterdam <info@blackhat-security.nl>
Date:   Fri Apr 30 18:18:09 2021 +0200

    - make sure options cannot be reused as it will
        cause double and conflicting arguments to chrome

commit cf059a638c
Author: ultrafunkamsterdam <info@blackhat-security.nl>
Date:   Thu Apr 29 12:54:49 2021 +0200

    - support for specifying and reusing the user profile folder.
        if a user-data-dir is specified, that folder will NOT be
        deleted on exit.
        example:
            options.add_argument('--user-data-dir=c:\\temp')

    - uses a platform specific app data folder to store driver instead
        of the current workdir.

    - impoved headless mode. fixed detection by notification perms.

    - eliminates the "restore tabs" notification at startup

    - added methods find_elements_by_text and find_element_by_text

    - updated docs (partly)

    -known issues:
        - extensions not running. this is due to the inner workings
            of chromedriver. still working on this.
        - driver window is not always closing along with a program exit.
        - MacOS: startup nag notifications. might be solved by
            re(using) a profile directory.

    - known stuff:
        - some specific use cases, network conditions or behaviour
          can cause being detected.

commit b40d23c649
Author: ultrafunkamsterdam <info@blackhat-security.nl>
Date:   Tue Apr 27 20:41:18 2021 +0200

    uncomment block

commit d99809c8c6
Author: ultrafunkamsterdam <info@blackhat-security.nl>
Date:   Tue Apr 27 20:19:51 2021 +0200

    tidy up

* .

* 2.2.7

Co-authored-by: ultrafunkamsterdam <info@blackhat-security.nl>
2021-05-01 22:49:59 +02:00
UltrafunkAmsterdam b3484a8b7e 2.2.1 Fixed issue where arguments were not passed along to chrome. Some small improvements for v2 headless, which is still detectable, but it's getting better...., 2021-03-25 10:23:32 +01:00
UltrafunkAmsterdam 853f299967 remove the subclass and use delegation to access Webdrivers methods. This way an exception somewhere along your program will still ensure gracefull shutdown afterwards and fixes some other issues as well because Webdriver is now bound to the object instead of only initialized within the __init__ haeving no references at all. 2021-03-20 05:28:42 +01:00
unknown b3014260ce fix invalid session id after using get_in or context manager style 2021-02-04 12:55:44 +01:00
unknown 10b341b574 2.1.1 code cleanup, added v2 example to readme 2021-02-04 12:22:28 +01:00
Leon fd91a89921
bump version 2021-02-04 11:49:06 +01:00
unknown d9c3afe4bd bugfixes 2021-01-17 21:11:44 +01:00
Leon ed5de61d67
Update setup.py 2021-01-17 17:36:54 +01:00
unknown e6d3299cbf v2 option 2021-01-17 06:11:11 +01:00
Leon 6809a2d23c
Update setup.py 2020-12-19 15:50:54 +01:00
Leon ea50a9d2c6
Update setup.py 2020-11-25 12:48:24 +01:00
Leon 7400dd407f
typo in url 2020-10-14 11:17:00 +02:00
Leon 068d83bcef
Update setup.py 2020-10-14 10:51:48 +02:00
ultrafunkamsterdam 4ce47e7f83 1.5.0 2020-10-13 03:51:35 +02:00
ultrafunkamsterdam 8baa61990f working patch 2020-09-19 18:22:03 +02:00
ultrafunkamsterdam 17e1f0e584 Revert "working patch"
This reverts commit c0ee188636.
2020-09-19 18:15:41 +02:00
Goolen c0ee188636 working patch 2020-09-19 18:01:11 +02:00
Leon 686b4b6c57
disabled console log by default. to override use uc.Chrome(enable_console_log=True)
disabled console log by default. to override use uc.Chrome(enable_console_log=True)
2020-09-13 11:48:28 +02:00
ultrafunkamsterdam b7685af668 added to pip package index 2020-09-03 22:12:09 +02:00
Leon fe2dbc0f0a
Update setup.py 2020-09-02 05:01:25 +02:00
Leon 3658fb38eb
Update setup.py 2020-06-15 19:17:32 +02:00
Leon c9a6bf87aa
Update setup.py 2020-06-03 13:45:16 +02:00
UltrafunkAmsterdam 2d2401caa5 fixed the TARGET_VERSION variable. is now actually evaluated at execution time so the correct chromedriver for your version of chrome is being downloaded... + some refactorings 2020-05-19 20:55:13 +02:00
Leon 3481948014
version bump 2020-05-12 19:47:07 +02:00
Leon a80ce8db0b
version bump 2020-01-02 10:10:53 +01:00
Leon 2b7ba9dc74
Update setup.py 2020-01-02 09:57:30 +01:00
Leon 725030e846
Update setup.py 2019-12-22 13:53:06 +01:00
Leon 0c73dcc9ef
Add files via upload 2019-12-22 13:50:09 +01:00