From 230615a1288d55607a2a37dc45183afd86267aab Mon Sep 17 00:00:00 2001 From: g1879 Date: Fri, 6 Dec 2024 07:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9LICENSE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/__init__.py | 18 +++++- DrissionPage/__init__.pyi | 3 +- DrissionPage/_base/base.py | 3 +- DrissionPage/_base/base.pyi | 3 +- DrissionPage/_base/chromium.py | 3 +- DrissionPage/_base/chromium.pyi | 3 +- DrissionPage/_base/driver.py | 3 +- DrissionPage/_base/driver.pyi | 3 +- DrissionPage/_configs/chromium_options.py | 3 +- DrissionPage/_configs/chromium_options.pyi | 3 +- DrissionPage/_configs/options_manage.py | 3 +- DrissionPage/_configs/options_manage.pyi | 3 +- DrissionPage/_configs/session_options.py | 3 +- DrissionPage/_configs/session_options.pyi | 3 +- DrissionPage/_elements/chromium_element.py | 3 +- DrissionPage/_elements/chromium_element.pyi | 3 +- DrissionPage/_elements/none_element.py | 3 +- DrissionPage/_elements/none_element.pyi | 3 +- DrissionPage/_elements/session_element.py | 3 +- DrissionPage/_elements/session_element.pyi | 3 +- DrissionPage/_functions/browser.py | 3 +- DrissionPage/_functions/browser.pyi | 3 +- DrissionPage/_functions/by.py | 3 +- DrissionPage/_functions/cli.py | 3 +- DrissionPage/_functions/cookies.py | 3 +- DrissionPage/_functions/cookies.pyi | 3 +- DrissionPage/_functions/elements.py | 3 +- DrissionPage/_functions/elements.pyi | 3 +- DrissionPage/_functions/keys.py | 5 +- DrissionPage/_functions/keys.pyi | 3 +- DrissionPage/_functions/locator.py | 5 +- DrissionPage/_functions/locator.pyi | 3 +- DrissionPage/_functions/settings.py | 3 +- DrissionPage/_functions/settings.pyi | 3 +- DrissionPage/_functions/tools.py | 3 +- DrissionPage/_functions/tools.pyi | 3 +- DrissionPage/_functions/web.py | 3 +- DrissionPage/_functions/web.pyi | 3 +- DrissionPage/_pages/chromium_base.py | 5 +- DrissionPage/_pages/chromium_base.pyi | 3 +- DrissionPage/_pages/chromium_frame.py | 3 +- DrissionPage/_pages/chromium_frame.pyi | 3 +- DrissionPage/_pages/chromium_page.py | 3 +- DrissionPage/_pages/chromium_page.pyi | 3 +- DrissionPage/_pages/chromium_tab.py | 3 +- DrissionPage/_pages/chromium_tab.pyi | 3 +- DrissionPage/_pages/mix_tab.py | 3 +- DrissionPage/_pages/mix_tab.pyi | 3 +- DrissionPage/_pages/session_page.py | 3 +- DrissionPage/_pages/session_page.pyi | 3 +- DrissionPage/_pages/web_page.py | 3 +- DrissionPage/_pages/web_page.pyi | 3 +- DrissionPage/_units/actions.py | 3 +- DrissionPage/_units/actions.pyi | 3 +- DrissionPage/_units/clicker.py | 3 +- DrissionPage/_units/clicker.pyi | 3 +- DrissionPage/_units/cookies_setter.py | 3 +- DrissionPage/_units/cookies_setter.pyi | 3 +- DrissionPage/_units/downloader.py | 3 +- DrissionPage/_units/downloader.pyi | 3 +- DrissionPage/_units/listener.py | 3 +- DrissionPage/_units/listener.pyi | 3 +- DrissionPage/_units/rect.py | 3 +- DrissionPage/_units/rect.pyi | 3 +- DrissionPage/_units/screencast.py | 3 +- DrissionPage/_units/screencast.pyi | 3 +- DrissionPage/_units/scroller.py | 3 +- DrissionPage/_units/scroller.pyi | 3 +- DrissionPage/_units/selector.py | 3 +- DrissionPage/_units/selector.pyi | 3 +- DrissionPage/_units/setter.py | 3 +- DrissionPage/_units/setter.pyi | 3 +- DrissionPage/_units/states.py | 3 +- DrissionPage/_units/states.pyi | 3 +- DrissionPage/_units/waiter.py | 3 +- DrissionPage/_units/waiter.pyi | 3 +- DrissionPage/common.py | 3 +- DrissionPage/errors.py | 3 +- DrissionPage/items.py | 3 +- LICENSE | 64 ++++++++++++++------- 80 files changed, 138 insertions(+), 184 deletions(-) diff --git a/DrissionPage/__init__.py b/DrissionPage/__init__.py index 5d6762d..02f54a4 100644 --- a/DrissionPage/__init__.py +++ b/DrissionPage/__init__.py @@ -2,8 +2,20 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. +本项目允许个人以源代码形式使用,仅限于学习和合法非盈利使用。 +如未获得版权持有人授权,不得用于商业行为。 + +使用本项目需满足以下条款,如使用过程中出现违反任意一项条款的情形,授权自动失效。 +* 禁止将DrissionPage应用到任何可能违反当地法律规定和道德约束的项目中 +* 禁止将DrissionPage用于任何可能有损他人利益的项目中 +* 禁止将DrissionPage用于攻击与骚扰行为 +* 遵守Robots协议,禁止将DrissionPage用于采集法律或系统Robots协议不允许的数据 + +使用DrissionPage发生的一切行为均由使用人自行负责。 +因使用DrissionPage进行任何行为所产生的一切纠纷及后果均与版权持有人无关, +版权持有人不承担任何使用DrissionPage带来的风险和损失。 +版权持有人不对DrissionPage可能存在的缺陷导致的任何损失负任何责任。 """ from ._base.chromium import Chromium from ._configs.chromium_options import ChromiumOptions @@ -12,4 +24,4 @@ from ._pages.chromium_page import ChromiumPage from ._pages.session_page import SessionPage from ._pages.web_page import WebPage -__version__ = '4.1.0.12' +__version__ = '4.1.0.13' diff --git a/DrissionPage/__init__.pyi b/DrissionPage/__init__.pyi index 4271c2b..b7c09b3 100644 --- a/DrissionPage/__init__.pyi +++ b/DrissionPage/__init__.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from ._base.chromium import Chromium from ._configs.chromium_options import ChromiumOptions diff --git a/DrissionPage/_base/base.py b/DrissionPage/_base/base.py index b29bd7c..aa2dc14 100644 --- a/DrissionPage/_base/base.py +++ b/DrissionPage/_base/base.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from abc import abstractmethod from copy import copy diff --git a/DrissionPage/_base/base.pyi b/DrissionPage/_base/base.pyi index 7112b31..7c5424c 100644 --- a/DrissionPage/_base/base.pyi +++ b/DrissionPage/_base/base.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from abc import abstractmethod from typing import Union, Tuple, List, Any, Optional, Dict diff --git a/DrissionPage/_base/chromium.py b/DrissionPage/_base/chromium.py index 28e944c..887bb4b 100644 --- a/DrissionPage/_base/chromium.py +++ b/DrissionPage/_base/chromium.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from re import match diff --git a/DrissionPage/_base/chromium.pyi b/DrissionPage/_base/chromium.pyi index 1405dd2..afe1594 100644 --- a/DrissionPage/_base/chromium.pyi +++ b/DrissionPage/_base/chromium.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from threading import Lock from typing import List, Optional, Set, Dict, Union, Tuple, Literal, Any diff --git a/DrissionPage/_base/driver.py b/DrissionPage/_base/driver.py index 5b7c40b..f565e29 100644 --- a/DrissionPage/_base/driver.py +++ b/DrissionPage/_base/driver.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from json import dumps, loads, JSONDecodeError from queue import Queue, Empty diff --git a/DrissionPage/_base/driver.pyi b/DrissionPage/_base/driver.pyi index 4cb69b4..796b053 100644 --- a/DrissionPage/_base/driver.pyi +++ b/DrissionPage/_base/driver.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from queue import Queue from threading import Thread diff --git a/DrissionPage/_configs/chromium_options.py b/DrissionPage/_configs/chromium_options.py index 17a3b76..d41e947 100644 --- a/DrissionPage/_configs/chromium_options.py +++ b/DrissionPage/_configs/chromium_options.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from re import search diff --git a/DrissionPage/_configs/chromium_options.pyi b/DrissionPage/_configs/chromium_options.pyi index d6de46b..c04e62b 100644 --- a/DrissionPage/_configs/chromium_options.pyi +++ b/DrissionPage/_configs/chromium_options.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Any, Literal, Optional, Tuple diff --git a/DrissionPage/_configs/options_manage.py b/DrissionPage/_configs/options_manage.py index a8d02a8..f39bbf5 100644 --- a/DrissionPage/_configs/options_manage.py +++ b/DrissionPage/_configs/options_manage.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from configparser import RawConfigParser, NoSectionError, NoOptionError from pathlib import Path diff --git a/DrissionPage/_configs/options_manage.pyi b/DrissionPage/_configs/options_manage.pyi index 7260644..b0d2348 100644 --- a/DrissionPage/_configs/options_manage.pyi +++ b/DrissionPage/_configs/options_manage.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from configparser import RawConfigParser from pathlib import Path diff --git a/DrissionPage/_configs/session_options.py b/DrissionPage/_configs/session_options.py index f8b52ae..664acd8 100644 --- a/DrissionPage/_configs/session_options.py +++ b/DrissionPage/_configs/session_options.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from copy import copy from pathlib import Path diff --git a/DrissionPage/_configs/session_options.pyi b/DrissionPage/_configs/session_options.pyi index 305ec09..4098721 100644 --- a/DrissionPage/_configs/session_options.pyi +++ b/DrissionPage/_configs/session_options.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from http.cookiejar import CookieJar, Cookie from pathlib import Path diff --git a/DrissionPage/_elements/chromium_element.py b/DrissionPage/_elements/chromium_element.py index 22f8bc1..91a0e7d 100644 --- a/DrissionPage/_elements/chromium_element.py +++ b/DrissionPage/_elements/chromium_element.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from json import loads from os.path import basename diff --git a/DrissionPage/_elements/chromium_element.pyi b/DrissionPage/_elements/chromium_element.pyi index 626b0b1..3cb4054 100644 --- a/DrissionPage/_elements/chromium_element.pyi +++ b/DrissionPage/_elements/chromium_element.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Tuple, List, Any, Literal, Optional diff --git a/DrissionPage/_elements/none_element.py b/DrissionPage/_elements/none_element.py index 33bef46..b8f7ba8 100644 --- a/DrissionPage/_elements/none_element.py +++ b/DrissionPage/_elements/none_element.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from .._functions.settings import Settings from ..errors import ElementNotFoundError diff --git a/DrissionPage/_elements/none_element.pyi b/DrissionPage/_elements/none_element.pyi index 7fa5b76..902dd16 100644 --- a/DrissionPage/_elements/none_element.pyi +++ b/DrissionPage/_elements/none_element.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Any diff --git a/DrissionPage/_elements/session_element.py b/DrissionPage/_elements/session_element.py index 169fe5b..64956f3 100644 --- a/DrissionPage/_elements/session_element.py +++ b/DrissionPage/_elements/session_element.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from html import unescape from re import match, sub, DOTALL, search diff --git a/DrissionPage/_elements/session_element.pyi b/DrissionPage/_elements/session_element.pyi index eac4d36..4997d7b 100644 --- a/DrissionPage/_elements/session_element.pyi +++ b/DrissionPage/_elements/session_element.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union, List, Tuple, Optional diff --git a/DrissionPage/_functions/browser.py b/DrissionPage/_functions/browser.py index ca9107f..1f27482 100644 --- a/DrissionPage/_functions/browser.py +++ b/DrissionPage/_functions/browser.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from json import load, dump, JSONDecodeError from os import environ diff --git a/DrissionPage/_functions/browser.pyi b/DrissionPage/_functions/browser.pyi index d43f561..c4ac98d 100644 --- a/DrissionPage/_functions/browser.pyi +++ b/DrissionPage/_functions/browser.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union diff --git a/DrissionPage/_functions/by.py b/DrissionPage/_functions/by.py index e494189..3c1a8a3 100644 --- a/DrissionPage/_functions/by.py +++ b/DrissionPage/_functions/by.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ diff --git a/DrissionPage/_functions/cli.py b/DrissionPage/_functions/cli.py index 0141c60..1cd8f99 100644 --- a/DrissionPage/_functions/cli.py +++ b/DrissionPage/_functions/cli.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from click import command, option diff --git a/DrissionPage/_functions/cookies.py b/DrissionPage/_functions/cookies.py index 2a8d59e..7044b78 100644 --- a/DrissionPage/_functions/cookies.py +++ b/DrissionPage/_functions/cookies.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from datetime import datetime from http.cookiejar import Cookie, CookieJar diff --git a/DrissionPage/_functions/cookies.pyi b/DrissionPage/_functions/cookies.pyi index 999c355..3624138 100644 --- a/DrissionPage/_functions/cookies.pyi +++ b/DrissionPage/_functions/cookies.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from http.cookiejar import Cookie from typing import Union diff --git a/DrissionPage/_functions/elements.py b/DrissionPage/_functions/elements.py index 304569d..3249f2d 100644 --- a/DrissionPage/_functions/elements.py +++ b/DrissionPage/_functions/elements.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from time import perf_counter, sleep diff --git a/DrissionPage/_functions/elements.pyi b/DrissionPage/_functions/elements.pyi index 830e925..6b2b422 100644 --- a/DrissionPage/_functions/elements.pyi +++ b/DrissionPage/_functions/elements.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union, List, Optional, Iterable, Dict diff --git a/DrissionPage/_functions/keys.py b/DrissionPage/_functions/keys.py index 210d94a..cbf2f30 100644 --- a/DrissionPage/_functions/keys.py +++ b/DrissionPage/_functions/keys.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from platform import system @@ -236,7 +235,7 @@ keyDefinitions = { '\ue020': {'keyCode': 54, 'code': 'Digit6', 'shiftKey': '^', 'key': '6'}, '\ue021': {'keyCode': 55, 'code': 'Digit7', 'shiftKey': '&', 'key': '7'}, '\ue022': {'keyCode': 56, 'code': 'Digit8', 'shiftKey': '*', 'key': '8'}, - '\ue023': {'keyCode': 57, 'code': 'Digit9', 'shiftKey': '\(', 'key': '9'}, + '\ue023': {'keyCode': 57, 'code': 'Digit9', 'shiftKey': r'\(', 'key': '9'}, '\ue024': {'keyCode': 106, 'code': 'NumpadMultiply', 'key': '*', 'location': 3}, '\ue025': {'keyCode': 107, 'code': 'NumpadAdd', 'key': '+', 'location': 3}, '\ue027': {'keyCode': 109, 'code': 'NumpadSubtract', 'key': '-', 'location': 3}, diff --git a/DrissionPage/_functions/keys.pyi b/DrissionPage/_functions/keys.pyi index f41ec9a..a2d42db 100644 --- a/DrissionPage/_functions/keys.pyi +++ b/DrissionPage/_functions/keys.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Tuple, Union, Any diff --git a/DrissionPage/_functions/locator.py b/DrissionPage/_functions/locator.py index 628875d..be6a467 100644 --- a/DrissionPage/_functions/locator.py +++ b/DrissionPage/_functions/locator.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from re import split from .by import By @@ -343,7 +342,7 @@ def _make_multi_xpath_str(tag: str, text: str) -> tuple: def _quotes_escape(search_str: str) -> str: - """将"转义,不知何故不能直接用 \ 来转义 + """将"转义,不知何故不能直接用 斜杠 来转义 :param search_str: 查询字符串 :return: 把"转义后的字符串 """ diff --git a/DrissionPage/_functions/locator.pyi b/DrissionPage/_functions/locator.pyi index c73f84c..76837dd 100644 --- a/DrissionPage/_functions/locator.pyi +++ b/DrissionPage/_functions/locator.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union diff --git a/DrissionPage/_functions/settings.py b/DrissionPage/_functions/settings.py index 53838e5..1a7b8e8 100644 --- a/DrissionPage/_functions/settings.py +++ b/DrissionPage/_functions/settings.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path diff --git a/DrissionPage/_functions/settings.pyi b/DrissionPage/_functions/settings.pyi index bca1de0..4702194 100644 --- a/DrissionPage/_functions/settings.pyi +++ b/DrissionPage/_functions/settings.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Optional, Union diff --git a/DrissionPage/_functions/tools.py b/DrissionPage/_functions/tools.py index 7c56840..3ce8970 100644 --- a/DrissionPage/_functions/tools.py +++ b/DrissionPage/_functions/tools.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from platform import system diff --git a/DrissionPage/_functions/tools.pyi b/DrissionPage/_functions/tools.pyi index a5d00e5..3f32458 100644 --- a/DrissionPage/_functions/tools.pyi +++ b/DrissionPage/_functions/tools.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from os import popen from pathlib import Path diff --git a/DrissionPage/_functions/web.py b/DrissionPage/_functions/web.py index f1a1f3d..5fcb34c 100644 --- a/DrissionPage/_functions/web.py +++ b/DrissionPage/_functions/web.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from html import unescape from os.path import sep diff --git a/DrissionPage/_functions/web.pyi b/DrissionPage/_functions/web.pyi index 55010c6..f662fe8 100644 --- a/DrissionPage/_functions/web.pyi +++ b/DrissionPage/_functions/web.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Optional, Tuple diff --git a/DrissionPage/_pages/chromium_base.py b/DrissionPage/_pages/chromium_base.py index e6ce36d..32b7aaf 100644 --- a/DrissionPage/_pages/chromium_base.py +++ b/DrissionPage/_pages/chromium_base.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from json import loads, JSONDecodeError from os.path import sep @@ -603,7 +602,7 @@ class ChromiumBase(BasePage): try: ele = self._run_js(js, *args) except JavaScriptError: - raise RuntimeError('此网页DOM不允许修改。') + raise RuntimeError('此网页不支持html格式新建元素,请用dict传入html_or_info参数。') return ele def get_frame(self, loc_ind_ele, timeout=None): diff --git a/DrissionPage/_pages/chromium_base.pyi b/DrissionPage/_pages/chromium_base.pyi index 1d2b9ce..fdd0ea7 100644 --- a/DrissionPage/_pages/chromium_base.pyi +++ b/DrissionPage/_pages/chromium_base.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Tuple, Any, Optional, Literal diff --git a/DrissionPage/_pages/chromium_frame.py b/DrissionPage/_pages/chromium_frame.py index a055d47..cf93fb1 100644 --- a/DrissionPage/_pages/chromium_frame.py +++ b/DrissionPage/_pages/chromium_frame.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from copy import copy from re import search, findall, DOTALL diff --git a/DrissionPage/_pages/chromium_frame.pyi b/DrissionPage/_pages/chromium_frame.pyi index 66758a5..b8bb9ce 100644 --- a/DrissionPage/_pages/chromium_frame.pyi +++ b/DrissionPage/_pages/chromium_frame.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Tuple, List, Any, Optional, Literal diff --git a/DrissionPage/_pages/chromium_page.py b/DrissionPage/_pages/chromium_page.py index 7815249..3b69525 100644 --- a/DrissionPage/_pages/chromium_page.py +++ b/DrissionPage/_pages/chromium_page.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from time import sleep diff --git a/DrissionPage/_pages/chromium_page.pyi b/DrissionPage/_pages/chromium_page.pyi index f90b167..213fc01 100644 --- a/DrissionPage/_pages/chromium_page.pyi +++ b/DrissionPage/_pages/chromium_page.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Tuple, List, Optional diff --git a/DrissionPage/_pages/chromium_tab.py b/DrissionPage/_pages/chromium_tab.py index 3b4f425..803ecc2 100644 --- a/DrissionPage/_pages/chromium_tab.py +++ b/DrissionPage/_pages/chromium_tab.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from copy import copy from time import sleep diff --git a/DrissionPage/_pages/chromium_tab.pyi b/DrissionPage/_pages/chromium_tab.pyi index f0c355f..61adf0d 100644 --- a/DrissionPage/_pages/chromium_tab.pyi +++ b/DrissionPage/_pages/chromium_tab.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Optional diff --git a/DrissionPage/_pages/mix_tab.py b/DrissionPage/_pages/mix_tab.py index 73cddb6..c1ee809 100644 --- a/DrissionPage/_pages/mix_tab.py +++ b/DrissionPage/_pages/mix_tab.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from .chromium_tab import ChromiumTab from .._base.base import BasePage diff --git a/DrissionPage/_pages/mix_tab.pyi b/DrissionPage/_pages/mix_tab.pyi index c540b27..8172b25 100644 --- a/DrissionPage/_pages/mix_tab.pyi +++ b/DrissionPage/_pages/mix_tab.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from http.cookiejar import CookieJar from typing import Union, Tuple, Any, Optional, Literal diff --git a/DrissionPage/_pages/session_page.py b/DrissionPage/_pages/session_page.py index aed5fb4..2d3c678 100644 --- a/DrissionPage/_pages/session_page.py +++ b/DrissionPage/_pages/session_page.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from re import search, DOTALL diff --git a/DrissionPage/_pages/session_page.pyi b/DrissionPage/_pages/session_page.pyi index 28eb42a..5a6dbd9 100644 --- a/DrissionPage/_pages/session_page.pyi +++ b/DrissionPage/_pages/session_page.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Any, Union, Tuple, Optional diff --git a/DrissionPage/_pages/web_page.py b/DrissionPage/_pages/web_page.py index 5d997b6..753efb0 100644 --- a/DrissionPage/_pages/web_page.py +++ b/DrissionPage/_pages/web_page.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from .chromium_page import ChromiumPage from .session_page import SessionPage diff --git a/DrissionPage/_pages/web_page.pyi b/DrissionPage/_pages/web_page.pyi index 463e8b9..586f784 100644 --- a/DrissionPage/_pages/web_page.pyi +++ b/DrissionPage/_pages/web_page.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from http.cookiejar import CookieJar from typing import Union, Tuple, List, Any, Optional, Literal diff --git a/DrissionPage/_units/actions.py b/DrissionPage/_units/actions.py index 96dfc05..ffc640c 100644 --- a/DrissionPage/_units/actions.py +++ b/DrissionPage/_units/actions.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from time import sleep, perf_counter diff --git a/DrissionPage/_units/actions.pyi b/DrissionPage/_units/actions.pyi index da3fcda..bf8a16e 100644 --- a/DrissionPage/_units/actions.pyi +++ b/DrissionPage/_units/actions.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union, Tuple, Any, Literal diff --git a/DrissionPage/_units/clicker.py b/DrissionPage/_units/clicker.py index d9854fe..9bec900 100644 --- a/DrissionPage/_units/clicker.py +++ b/DrissionPage/_units/clicker.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from time import perf_counter, sleep diff --git a/DrissionPage/_units/clicker.pyi b/DrissionPage/_units/clicker.pyi index 7a43b3a..3c0e030 100644 --- a/DrissionPage/_units/clicker.pyi +++ b/DrissionPage/_units/clicker.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union diff --git a/DrissionPage/_units/cookies_setter.py b/DrissionPage/_units/cookies_setter.py index 1dab0fa..d7c9471 100644 --- a/DrissionPage/_units/cookies_setter.py +++ b/DrissionPage/_units/cookies_setter.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from .._functions.cookies import set_tab_cookies, set_session_cookies, set_browser_cookies diff --git a/DrissionPage/_units/cookies_setter.pyi b/DrissionPage/_units/cookies_setter.pyi index a1cf78f..ef2a451 100644 --- a/DrissionPage/_units/cookies_setter.pyi +++ b/DrissionPage/_units/cookies_setter.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from http.cookiejar import Cookie, CookieJar from typing import Union diff --git a/DrissionPage/_units/downloader.py b/DrissionPage/_units/downloader.py index 08b4db8..3302879 100644 --- a/DrissionPage/_units/downloader.py +++ b/DrissionPage/_units/downloader.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from os.path import sep from pathlib import Path diff --git a/DrissionPage/_units/downloader.pyi b/DrissionPage/_units/downloader.pyi index bc45d73..a7be729 100644 --- a/DrissionPage/_units/downloader.pyi +++ b/DrissionPage/_units/downloader.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Dict, Optional, Union, Literal, Set diff --git a/DrissionPage/_units/listener.py b/DrissionPage/_units/listener.py index f3d3966..2524ec9 100644 --- a/DrissionPage/_units/listener.py +++ b/DrissionPage/_units/listener.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from base64 import b64decode from json import JSONDecodeError, loads diff --git a/DrissionPage/_units/listener.pyi b/DrissionPage/_units/listener.pyi index 91200aa..7a4e6ce 100644 --- a/DrissionPage/_units/listener.pyi +++ b/DrissionPage/_units/listener.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from queue import Queue from typing import Union, List, Iterable, Optional, Literal, Any diff --git a/DrissionPage/_units/rect.py b/DrissionPage/_units/rect.py index 3ae3321..cc5f107 100644 --- a/DrissionPage/_units/rect.py +++ b/DrissionPage/_units/rect.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ diff --git a/DrissionPage/_units/rect.pyi b/DrissionPage/_units/rect.pyi index 93a8b1f..f02210a 100644 --- a/DrissionPage/_units/rect.pyi +++ b/DrissionPage/_units/rect.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Tuple, Union diff --git a/DrissionPage/_units/screencast.py b/DrissionPage/_units/screencast.py index b5bcaed..33d8033 100644 --- a/DrissionPage/_units/screencast.py +++ b/DrissionPage/_units/screencast.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from base64 import b64decode from os.path import sep diff --git a/DrissionPage/_units/screencast.pyi b/DrissionPage/_units/screencast.pyi index 4d46aa0..483479b 100644 --- a/DrissionPage/_units/screencast.pyi +++ b/DrissionPage/_units/screencast.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Optional diff --git a/DrissionPage/_units/scroller.py b/DrissionPage/_units/scroller.py index 66c6ce3..2c5b5ce 100644 --- a/DrissionPage/_units/scroller.py +++ b/DrissionPage/_units/scroller.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from time import sleep, perf_counter diff --git a/DrissionPage/_units/scroller.pyi b/DrissionPage/_units/scroller.pyi index 03fa308..85bda2d 100644 --- a/DrissionPage/_units/scroller.pyi +++ b/DrissionPage/_units/scroller.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union diff --git a/DrissionPage/_units/selector.py b/DrissionPage/_units/selector.py index b6bbebd..77adf75 100644 --- a/DrissionPage/_units/selector.py +++ b/DrissionPage/_units/selector.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from time import perf_counter, sleep diff --git a/DrissionPage/_units/selector.pyi b/DrissionPage/_units/selector.pyi index 574fbad..ba1aedf 100644 --- a/DrissionPage/_units/selector.pyi +++ b/DrissionPage/_units/selector.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union, Tuple, List, Optional diff --git a/DrissionPage/_units/setter.py b/DrissionPage/_units/setter.py index 492e1a0..b6b33a1 100644 --- a/DrissionPage/_units/setter.py +++ b/DrissionPage/_units/setter.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from time import sleep diff --git a/DrissionPage/_units/setter.pyi b/DrissionPage/_units/setter.pyi index b1f9e97..6c9e876 100644 --- a/DrissionPage/_units/setter.pyi +++ b/DrissionPage/_units/setter.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from pathlib import Path from typing import Union, Tuple, Literal, Any, Optional diff --git a/DrissionPage/_units/states.py b/DrissionPage/_units/states.py index 1810a10..94b5b9e 100644 --- a/DrissionPage/_units/states.py +++ b/DrissionPage/_units/states.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from .._functions.web import location_in_viewport from ..errors import CDPError, NoRectError, PageDisconnectedError, ElementLostError diff --git a/DrissionPage/_units/states.pyi b/DrissionPage/_units/states.pyi index 6aee4a7..2a27a01 100644 --- a/DrissionPage/_units/states.pyi +++ b/DrissionPage/_units/states.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union, Tuple, List, Optional, Literal diff --git a/DrissionPage/_units/waiter.py b/DrissionPage/_units/waiter.py index 02ba1d2..7312cf9 100644 --- a/DrissionPage/_units/waiter.py +++ b/DrissionPage/_units/waiter.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from time import sleep, perf_counter diff --git a/DrissionPage/_units/waiter.pyi b/DrissionPage/_units/waiter.pyi index 8181d07..fd17ac5 100644 --- a/DrissionPage/_units/waiter.pyi +++ b/DrissionPage/_units/waiter.pyi @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from typing import Union, Tuple, Any diff --git a/DrissionPage/common.py b/DrissionPage/common.py index 351893b..1eaeeb9 100644 --- a/DrissionPage/common.py +++ b/DrissionPage/common.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from ._base.chromium import Chromium from ._configs.chromium_options import ChromiumOptions diff --git a/DrissionPage/errors.py b/DrissionPage/errors.py index 51996e3..1a47a8d 100644 --- a/DrissionPage/errors.py +++ b/DrissionPage/errors.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ diff --git a/DrissionPage/items.py b/DrissionPage/items.py index 146fb96..4794e4c 100644 --- a/DrissionPage/items.py +++ b/DrissionPage/items.py @@ -2,8 +2,7 @@ """ @Author : g1879 @Contact : g1879@qq.com -@Copyright: (c) 2024 by g1879, Inc. All Rights Reserved. -@License : BSD 3-Clause. +@Copyright: (c) 2020 by g1879, Inc. All Rights Reserved. """ from ._elements.chromium_element import ChromiumElement, ShadowRoot from ._elements.none_element import NoneElement diff --git a/LICENSE b/LICENSE index 3abfeb8..ec953fc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,29 +1,49 @@ -BSD 3-Clause License - Copyright (c) 2020, g1879 All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +允许任何人以个人身份使用或分发本项目源代码,但仅限于学习和合法非盈利目的。 -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. +个人或组织如未获得版权持有人授权,不得将本项目以源代码或二进制形式用于商业行为。 -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +使用本项目需满足以下条款,如使用过程中出现违反任意一项条款的情形,授权自动失效。 -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. +* 禁止将DrissionPage应用到任何可能违反当地法律规定和道德约束的项目中 -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* 禁止将DrissionPage用于任何可能有损他人利益的项目中 + +* 禁止将DrissionPage用于攻击与骚扰行为 + +* 遵守Robots协议,禁止将DrissionPage用于采集法律或系统Robots协议不允许的数据 + +使用DrissionPage发生的一切行为均由使用人自行负责。 +因使用DrissionPage进行任何行为所产生的一切纠纷及后果均与版权持有人无关, +版权持有人不承担任何使用DrissionPage带来的风险和损失。 +版权持有人不对DrissionPage可能存在的缺陷导致的任何损失负任何责任。 + +--------------------------------------------------------- + +Anyone may use or distribute the source code of this project in their personal capacity, +but only for the purpose of learning and legal non-profit activities. + +An individual or organization may not use the project's source code or binary form for +commercial purposes without authorization from the copyright holder. + +The following terms and conditions must be met in order to use this project. Authorization + will automatically expire if any of the terms are violated during use. + +* It is strictly prohibited to use the DrissionPage app for any project that may violate local + laws and ethical constraints. + +* It is strictly prohibited to use DrissionPage for any project that may harm the interests of others. + +* It is strictly prohibited to use DrissionPage for attack and harassment. + +* Follow the Robots protocol and do not use the DrissionPage to collect data that is prohibited + by law or the system's Robots protocol. + +All actions taken using DrissionPage are the responsibility of the user. +The copyright holder is not involved in any disputes or consequences arising from the use of +DrissionPage for any actions, and the copyright holder shall not bear any risks and losses arising +from the use of DrissionPage. +The copyright holder shall not bear any responsibility for any losses resulting from any defects in +DrissionPage. \ No newline at end of file