atomicshop 2.20.0__py3-none-any.whl → 2.20.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of atomicshop might be problematic. Click here for more details.

atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.20.0'
4
+ __version__ = '2.20.2'
atomicshop/web.py CHANGED
@@ -14,9 +14,12 @@ from . import filesystem, print_api
14
14
  # https://www.useragents.me/
15
15
  # https://user-agents.net/
16
16
  USER_AGENTS = {
17
+ 'Windows_Chrome_Latest':
18
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36',
17
19
  'Chrome_111.0.0_Windows_10-11_x64':
18
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
19
- 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36'
20
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
21
+ 'Chrome 132.0.0, Windows 10/11':
22
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36'
20
23
  }
21
24
 
22
25
 
@@ -12,6 +12,7 @@ from bs4 import BeautifulSoup
12
12
 
13
13
  from . import engine, base, combos
14
14
  from ...basics import threads, multiprocesses
15
+ from ... import web
15
16
 
16
17
 
17
18
  def get_text_from_html_tag(url: str, tag_name: str, attribute: str, value: str) -> str:
@@ -218,10 +219,12 @@ def _fetch_content(
218
219
  with sync_playwright() as p:
219
220
  browser = p.chromium.launch(headless=headless) # Set headless=True if you don't want to see the browser
220
221
 
222
+ user_agent: str = web.USER_AGENTS['Windows_Chrome_Latest']
223
+
221
224
  if text_fetch_method == "playwright_copypaste":
222
- context = browser.new_context(permissions=["clipboard-read", "clipboard-write"])
225
+ context = browser.new_context(permissions=["clipboard-read", "clipboard-write"], user_agent=user_agent)
223
226
  else:
224
- context = browser.new_context()
227
+ context = browser.new_context(user_agent=user_agent)
225
228
 
226
229
  page = context.new_page()
227
230
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.20.0
3
+ Version: 2.20.2
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=MXdDgQlKlf7wmFW-0FtDaVV4XgIVm3t1zRvpLRixZwk,123
1
+ atomicshop/__init__.py,sha256=YT_T5JzFRTIksmE_0awk2rKq2ttCQS7jQZk6RPF_DjQ,123
2
2
  atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
3
3
  atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
4
4
  atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
@@ -46,7 +46,7 @@ atomicshop/uuids.py,sha256=JSQdm3ZTJiwPQ1gYe6kU0TKS_7suwVrHc8JZDGYlydM,2214
46
46
  atomicshop/venvs.py,sha256=D9lwOoObkYoRx-weuoAmbvN-RdSHhVm4DE9TVl-utAs,903
47
47
  atomicshop/versioning.py,sha256=e5W6m9AF3__M5nntqI9CqNAeHqkwY9JhlnpYeZ1CEus,970
48
48
  atomicshop/virtualization.py,sha256=LPP4vjE0Vr10R6DA4lqhfX_WaNdDGRAZUW0Am6VeGco,494
49
- atomicshop/web.py,sha256=uIYt1WHXllc2wwnsW4AOI_IrAEm9j89qAQa4v3nR8Wk,12105
49
+ atomicshop/web.py,sha256=EVaHNgjfdIyJ4es0g0z7FXie4hic4Dsey_nP9ZuBNOc,12409
50
50
  atomicshop/websocket_parse.py,sha256=aLHWyKqaYqEn_MRBWm2L6rIl6QPmqbVrjEXE_rBzwCw,16711
51
51
  atomicshop/a_installs/ubuntu/docker_rootless.py,sha256=9IPNtGZYjfy1_n6ZRt7gWz9KZgR6XCgevjqq02xk-o0,281
52
52
  atomicshop/a_installs/ubuntu/docker_sudo.py,sha256=JzayxeyKDtiuT4Icp2L2LyFRbx4wvpyN_bHLfZ-yX5E,281
@@ -285,7 +285,7 @@ atomicshop/wrappers/playwrightw/javascript.py,sha256=_bW7CAtm0Y8IHYrAalg5HpPFnk6
285
285
  atomicshop/wrappers/playwrightw/keyboard.py,sha256=zN3YddGO-qUkn6C0CRVFejP4cTuaUwXLDNFhFREjERY,422
286
286
  atomicshop/wrappers/playwrightw/locators.py,sha256=6wsLywZxDuii7mwv-zQsRbqQC8r7j96Bma5b5_7ZoVo,2411
287
287
  atomicshop/wrappers/playwrightw/mouse.py,sha256=-2FZbQtjgH7tdXWld6ZPGqlKFUdf5in0ujN0hewxa50,656
288
- atomicshop/wrappers/playwrightw/scenarios.py,sha256=oLrZiWnIc09I0Zvh3IxPVDPsQ-Kbr4QM0TeyXGvlsaY,11494
288
+ atomicshop/wrappers/playwrightw/scenarios.py,sha256=0t7007v461HYF6TEeXxHoqxvf3jwu7dOnrwdvffe3bE,11629
289
289
  atomicshop/wrappers/playwrightw/waits.py,sha256=PBFdz_PoM7Fo7O8hLqMrxNPzBEYgPoXwZceFFCGGeu8,7182
290
290
  atomicshop/wrappers/psutilw/cpus.py,sha256=w6LPBMINqS-T_X8vzdYkLS2Wzuve28Ydp_GafTCngrc,236
291
291
  atomicshop/wrappers/psutilw/disks.py,sha256=3ZSVoommKH1TWo37j_83frB-NqXF4Nf5q5mBCX8G4jE,9221
@@ -330,8 +330,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2N
330
330
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
331
331
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
332
332
  atomicshop/wrappers/winregw/winreg_network.py,sha256=AENV88H1qDidrcpyM9OwEZxX5svfi-Jb4N6FkS1xtqA,8851
333
- atomicshop-2.20.0.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
334
- atomicshop-2.20.0.dist-info/METADATA,sha256=zbJAiLrIxDJYUGObVfd34_DYkekWcpB0Bw8GNo0DTKs,10630
335
- atomicshop-2.20.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
336
- atomicshop-2.20.0.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
337
- atomicshop-2.20.0.dist-info/RECORD,,
333
+ atomicshop-2.20.2.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
334
+ atomicshop-2.20.2.dist-info/METADATA,sha256=vUaF9sMXezhYJN5zLGjTupSrN9oMANcQhKKqnFmsgGY,10630
335
+ atomicshop-2.20.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
336
+ atomicshop-2.20.2.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
337
+ atomicshop-2.20.2.dist-info/RECORD,,