semvec/pypi-packages huggingface dataset:
a-selenium-scroll-down-forever 0.10
Scrolls down on a page
License: MIT
Keywords: Selenium,automation,scroll


# Scrolls down on a page

```python
# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10


$pip install a-selenium-scroll-down-forever

from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc
from time import sleep
from a_selenium_scroll_down_forever import scroll_down_forever


if __name__ == "__main__":
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(
        folder_path_for_exe=folderchromedriver, undetected=True
    )
    driver = uc.Chrome(driver_executable_path=path)
    driver.get(r"https://github.com/hansalemaos/a_cv2_easy_resize")
    sleep(2)
    scroll_down_forever(
        driver,
        pause_between_scrolls=(0.5, 0.1),
        max_scrolls=10,
        timeout=3,
        script_timeout=1,
    )
    
```
a-selenium-screenshot-whole-page 0.10
Takes a screenshot from a whole page (same size as page / no repeating parts)
License: MIT
Keywords: Selenium,automation,screenshot


# Takes a screenshot from a whole page (same size as page / no repeating parts)

```python
# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10


$pip install a-selenium-screenshot-whole-page

from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc
from a_selenium_screenshot_whole_page import get_screenshot_whole_page_with_scroll
from time import sleep

if __name__ == "__main__":
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(
        folder_path_for_exe=folderchromedriver, undetected=True
    )
    driver = uc.Chrome(driver_executable_path=path)
    driver.get(
        r"https://github.com/hansalemaos/a_cv2_easy_resize"
    )
    sleep(2)
    get_screenshot_whole_page_with_scroll(driver,sleepinterval=(0.2,0.8), save_path='f:\\testwholescreenshot.png')
    
    
```

<img src="https://github.com/hansalemaos/screenshots/raw/main/testwholescreenshot.png"/>
a-selenium-download-without-asking 0.10
Downloads are started automatically
License: MIT
Keywords: Selenium,automation,download


# Downloads are started automatically 


```python
# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10


$pip install a-selenium-download-without-asking

from a_selenium_download_without_asking import enable_download_without_asking
from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc


if __name__ == "__main__":
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(
        folder_path_for_exe=folderchromedriver, undetected=True
    )
    driver = uc.Chrome(driver_executable_path=path)
    enable_download_without_asking(driver, download_dir="f:\\testdownload")
    driver.get(
        r"https://github.com/hansalemaos/DigiDeutsch/raw/main/digi_deutsch_setup.exe"
    )
```
a-selenium-errorhandler 0.10
Ignores all ChromeDriver Exceptions, returns the Exception(s) as string
License: MIT
Keywords: Selenium,automation,Exception


# Ignores all ChromeDriver Exceptions, returns the Exception(s) as string


```python
# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10


$pip install a-selenium-errorhandler

from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By

from a_selenium_errorhandler import add_ignore_exception


if __name__ == "__main__":
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(
        folder_path_for_exe=folderchromedriver, undetected=True
    )
    driver = uc.Chrome(driver_executable_path=path)
    driver = add_ignore_exception(driver)

    # You can check if an executed command threw an Exception
    e1 = driver.find_element(By.CSS_SELECTOR, "not existing")
    if isinstance(e1, str):
        print("failed")
    else:
        print(e1)
        print("success")
    print("------------------")
    e1 = driver.find_element(By.CSS_SELECTOR, "*")
    if isinstance(e1, str):
        print("failed")
    else:
        print(e1)
        print("success")
```
a-selenium-kill 0.10
A decorator to kill Chrome if Selenium/ChromeDriver got stuck
License: MIT
Keywords: Selenium,automation,kill


# A decorator to kill Chrome if Selenium/ChromeDriver got stuck


```python
# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10


$pip install a-selenium-kill

from a_selenium_kill import add_kill_selenium
from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc

# You have to create the instance in a function, and use the decorator @add_kill_selenium
@add_kill_selenium
def get_driver():
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(folder_path_for_exe=folderchromedriver, undetected=True)
    driver = uc.Chrome(driver_executable_path=path)
    return driver

if __name__ == "__main__":
    driver = get_driver()
	
	#Kill Chrome:
	
	driver.die_die_die_selenium()
```
jsondataclasses 0.0.6
Typed JSON dataclasses
License: MIT
Requires Python: >=3.9.0

# JSON Dataclasses

![GitHub](https://img.shields.io/github/license/issy/python-jsondataclasses?style=flat-square)
![PyPI](https://img.shields.io/pypi/v/jsondataclasses?style=flat-square)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/issy/python-jsondataclasses/lint.yml?style=flat-square)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/issy/python-jsondataclasses/unit-tests.yml?label=tests&style=flat-square)

Typed JSON dataclasses for Python 3.9+

[Check out the docs](https://issy.github.io/python-jsondataclasses)

# Installation

`pip install jsondataclasses`

# Usage

```py
from datetime import date
from typing import Literal, Optional

from jsondataclasses import jsondataclass, jsonfield


def parse_date(date_string: str) -> date:
    return date.fromisoformat(date_string.replace(".", "-"))


@jsondataclass
class Car:
    make: Literal["Ford", "Renault", "Volkswagen"] = jsonfield("carMake")
    model: str = jsonfield("model")
    manufactured_at: date = jsonfield("dateOfManufacture", parse_date)
    num_of_wheels: Optional[int] = jsonfield("numberOfWheels", default_value=4)


car = Car({
    "carMake": "Ford",
    "model": "Focus",
    "dateOfManufacture": "2018.03.14"
})
print(car)  # Car(make='Ford', model='Focus', manufactured_at=datetime.date(2018, 3, 14), num_of_wheels=4)
```

Class field types can be any primitive type (eg. `str`, `int`, `datetime`),
a variadic generic (eg. `list[str]`, `Optional[int]`, `Literal["hello", "world"]`),
or even another jsondataclass. The `default_value` argument of `jsonfield` will be used
if the specified key is not found in the dictionary *and* the type of the class field is not `Optional[...]`.
In this case, the value of `default_value` will be passed to the supplied parser function.