optexity-browser-use 0.9.5.1__py3-none-any.whl → 0.9.5.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.
@@ -1361,14 +1361,14 @@ class BrowserSession(BaseModel):
1361
1361
  # SecurityWatchdog only handles security policy enforcement
1362
1362
  self._security_watchdog.attach_to_session()
1363
1363
 
1364
- # Initialize AboutBlankWatchdog (handles about:blank pages and DVD loading animation on first load)
1365
- AboutBlankWatchdog.model_rebuild()
1366
- self._aboutblank_watchdog = AboutBlankWatchdog(event_bus=self.event_bus, browser_session=self)
1367
- # self.event_bus.on(BrowserStopEvent, self._aboutblank_watchdog.on_BrowserStopEvent)
1368
- # self.event_bus.on(BrowserStoppedEvent, self._aboutblank_watchdog.on_BrowserStoppedEvent)
1369
- # self.event_bus.on(TabCreatedEvent, self._aboutblank_watchdog.on_TabCreatedEvent)
1370
- # self.event_bus.on(TabClosedEvent, self._aboutblank_watchdog.on_TabClosedEvent)
1371
- self._aboutblank_watchdog.attach_to_session()
1364
+ # # Initialize AboutBlankWatchdog (handles about:blank pages and DVD loading animation on first load)
1365
+ # AboutBlankWatchdog.model_rebuild()
1366
+ # self._aboutblank_watchdog = AboutBlankWatchdog(event_bus=self.event_bus, browser_session=self)
1367
+ # # self.event_bus.on(BrowserStopEvent, self._aboutblank_watchdog.on_BrowserStopEvent)
1368
+ # # self.event_bus.on(BrowserStoppedEvent, self._aboutblank_watchdog.on_BrowserStoppedEvent)
1369
+ # # self.event_bus.on(TabCreatedEvent, self._aboutblank_watchdog.on_TabCreatedEvent)
1370
+ # # self.event_bus.on(TabClosedEvent, self._aboutblank_watchdog.on_TabClosedEvent)
1371
+ # self._aboutblank_watchdog.attach_to_session()
1372
1372
 
1373
1373
  # Initialize PopupsWatchdog (handles accepting and dismissing JS dialogs, alerts, confirm, onbeforeunload, etc.)
1374
1374
  PopupsWatchdog.model_rebuild()
@@ -792,7 +792,7 @@ class DOMTreeSerializer:
792
792
  return False
793
793
 
794
794
  @staticmethod
795
- def serialize_tree(node: SimplifiedNode | None, include_attributes: list[str], depth: int = 0, remove_empty_nodes: bool = False) -> (list[str], bool):
795
+ def serialize_tree(node: SimplifiedNode | None, include_attributes: list[str], depth: int = 0, remove_empty_nodes: bool = False) -> tuple[list[str], bool]:
796
796
  """Serialize the optimized tree to string format."""
797
797
  if not node:
798
798
  return [], False
@@ -994,32 +994,20 @@ class DOMTreeSerializer:
994
994
  child_texts.append(child_text)
995
995
  child_is_interactives.append(child_is_interactive)
996
996
 
997
- if remove_empty_nodes:
998
- if is_empty_node and depth >= 0:
997
+ if remove_empty_nodes and is_empty_node and depth >= 0:
999
998
 
1000
- if len(child_texts) == 1 and len(formatted_text) > 0:
1001
- if child_is_interactives[0]:
1002
- formatted_text.pop()
1003
-
1004
- '''
1005
- bring child one level up as this is the new level of child
1006
- '''
1007
- if child_texts[0].startswith('\t'):
1008
- temp = [a[1:] for a in child_texts[0].split("\n")]
1009
- child_texts[0] = "\n".join(temp)
1010
-
1011
-
1012
- if len(child_texts) > 1 and len(formatted_text) > 0:
1013
- if all(child_is_interactives):
1014
- formatted_text.pop()
1015
-
1016
- '''
1017
- bring all children one level up as this is the new level of child if they start with a tab
1018
- '''
1019
- if all([child_text.startswith('\t') for child_text in child_texts]):
1020
- for i in range(len(child_texts)):
1021
- temp = [a[1:] for a in child_texts[i].split("\n")]
1022
- child_texts[i] = "\n".join(temp)
999
+
1000
+ if len(child_texts) >= 1 and len(formatted_text) > 0:
1001
+ if all(child_is_interactives):
1002
+ formatted_text.pop()
1003
+
1004
+ '''
1005
+ bring all children one level up as this is the new level of child if they start with a tab
1006
+ '''
1007
+ if all([child_text.startswith('\t') for child_text in child_texts]):
1008
+ for i in range(len(child_texts)):
1009
+ temp = [a[1:] for a in child_texts[i].split("\n")]
1010
+ child_texts[i] = "\n".join(temp)
1023
1011
 
1024
1012
  for child_text in child_texts:
1025
1013
  if child_text:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: optexity-browser-use
3
- Version: 0.9.5.1
3
+ Version: 0.9.5.2
4
4
  Summary: Make websites accessible for AI agents
5
5
  Project-URL: Repository, https://github.com/browser-use/browser-use
6
6
  Author: Gregor Zunic
@@ -31,7 +31,7 @@ browser_use/browser/__init__.py,sha256=-MlstnQw2ulh9gNkl2o1FC_fXGwZWf-N-SVcycwia
31
31
  browser_use/browser/events.py,sha256=zdevl6XV1URi1l2oyK25PYnECp_5TCQujp4SJAYKGB0,18086
32
32
  browser_use/browser/profile.py,sha256=JpyLRupA31gQ52sBQUVoE-MkLEjl_0nruikZp0X31rI,47237
33
33
  browser_use/browser/python_highlights.py,sha256=l27_46HDphCB566hmOaY5-wLLHtQouBua8sjS4eUJo4,18151
34
- browser_use/browser/session.py,sha256=tnrQxIL2q6tpcc6lrV0yx1JJXEtRiRx9DmB7AhQZ39w,126115
34
+ browser_use/browser/session.py,sha256=-NInTkAjPSo0MJNfxwqB1S-foWHTAeBZrhGGhN2tAPA,126131
35
35
  browser_use/browser/session_manager.py,sha256=XKk7S1JgS_9FXBISqzecQV_KH3hfhan7yOAQnkvQRZY,15412
36
36
  browser_use/browser/video_recorder.py,sha256=N0swIzPd-2e08WQZ3ei5h5tbH1PQlmD_eNTIDAKjNSk,5360
37
37
  browser_use/browser/views.py,sha256=HwxjM1y8N3QRr3vW4xQVLWX6E9x0rbF7V72ST0rXgkQ,6317
@@ -72,7 +72,7 @@ browser_use/dom/serializer/code_use_serializer.py,sha256=KZPRBzGJ50Kb2hqUh4eykwZ
72
72
  browser_use/dom/serializer/eval_serializer.py,sha256=TbRmZcKDiD2ImUM16LBjtet-d2-_6yVlZpnDyUiGG3g,15097
73
73
  browser_use/dom/serializer/html_serializer.py,sha256=G2k9PyS1byraiBVmb-r0zRPU7zdDY_r_yaZg_gnOX1E,6032
74
74
  browser_use/dom/serializer/paint_order.py,sha256=NCirHXEt5CjrBSh9UT41x0yeJ9o1xmkh81fUDmTud24,5542
75
- browser_use/dom/serializer/serializer.py,sha256=tsRx_yaD-RvZMqPUHgkgZA98ggf56YyWzgS0wEKir_U,48032
75
+ browser_use/dom/serializer/serializer.py,sha256=UHdcz6od2IW-mk93iWqeJnbfbF9fhxGuowBqpQ2noas,47663
76
76
  browser_use/filesystem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
77
  browser_use/filesystem/file_system.py,sha256=Gq3eCYXghsMcnZcrFeRdVWfgi6jUIzEbYXgXhZ0PdDE,19513
78
78
  browser_use/integrations/gmail/__init__.py,sha256=zjQIPpFYRMdaBv87KQZ0-rsuq3eBzLk7RFhQYG7b33Q,1020
@@ -140,8 +140,8 @@ browser_use/tools/utils.py,sha256=xvKOaZW6Q83qo3QjeR31ZR6ed4_DfkrP7tZC_NOuLPo,29
140
140
  browser_use/tools/views.py,sha256=Oxfd1k7ka_P-qq0tc7pxxNlmsQJi5rmbqngrleTHquI,2920
141
141
  browser_use/tools/registry/service.py,sha256=aagu-WrnMv4t_3x0rY10qP4W0dL6OBxd7Z41_Ku9tiY,22696
142
142
  browser_use/tools/registry/views.py,sha256=4r3qysEE5UMER-G7PtU1j6RlsbKbUu6-1eGMN6xRG9A,5743
143
- optexity_browser_use-0.9.5.1.dist-info/METADATA,sha256=hdUdge9DDpaOONmGCC3BYuaxBYJCGmTqrzcyiX1FkLw,11790
144
- optexity_browser_use-0.9.5.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
145
- optexity_browser_use-0.9.5.1.dist-info/entry_points.txt,sha256=NceUXLtKZs9AznxXL8P1rxVQVpF8jyk0x3SXZGhU1VE,87
146
- optexity_browser_use-0.9.5.1.dist-info/licenses/LICENSE,sha256=E1xXZxsO6VdmmwWgygDMBvZFSW01Hi5zKDLG4nbaml4,1069
147
- optexity_browser_use-0.9.5.1.dist-info/RECORD,,
143
+ optexity_browser_use-0.9.5.2.dist-info/METADATA,sha256=h9XtPkgrAMiNVQJ_hfTVaSdGhQ1jRIdAqi4QjB6Qj9c,11790
144
+ optexity_browser_use-0.9.5.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
145
+ optexity_browser_use-0.9.5.2.dist-info/entry_points.txt,sha256=NceUXLtKZs9AznxXL8P1rxVQVpF8jyk0x3SXZGhU1VE,87
146
+ optexity_browser_use-0.9.5.2.dist-info/licenses/LICENSE,sha256=E1xXZxsO6VdmmwWgygDMBvZFSW01Hi5zKDLG4nbaml4,1069
147
+ optexity_browser_use-0.9.5.2.dist-info/RECORD,,