Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
projects:sget [2025/03/14 11:48] darronprojects:sget [2025/03/14 12:39] (current) – [Install] darron
Line 1: Line 1:
 ====Selenium get==== ====Selenium get====
  
-This is a simple tool to fetch a page using selenium and allowing+This is a simple tool to fetch a page using selenium and allow
 access to its wait parameters. access to its wait parameters.
  
Line 12: Line 12:
 </code> </code>
  
 +[[https://hg.kewl.org/pub/sget/file/tip/sget.py|script]]
 ===Demo=== ===Demo===
  
-This web page loads a temporary page which will then delay a moment and reload its +This web page loads a page of temporary content and after a delay it will reload.
-content.+
  
-The content itself contains a subset of the full content and requires scrolling to+The reloaded content contains a subset of the full content and requires scrolling to
 reveal it all. reveal it all.
  
 +Fetch the temporary page
 <code> <code>
 py sget.py "https://www.deckenmalerei.eu/e8a3bf28-6365-42fe-a4d3-41608ed870e8" d0.html py sget.py "https://www.deckenmalerei.eu/e8a3bf28-6365-42fe-a4d3-41608ed870e8" d0.html
 +</code>
 +
 +Fetch the reloaded page
 +<code>
 py sget.py "https://www.deckenmalerei.eu/e8a3bf28-6365-42fe-a4d3-41608ed870e8" -d10 d10.html py sget.py "https://www.deckenmalerei.eu/e8a3bf28-6365-42fe-a4d3-41608ed870e8" -d10 d10.html
 </code> </code>
  
 +Compare temporary and reloaded
 <code> <code>
 diff d0.html d10.html | head -30 diff d0.html d10.html | head -30
Line 60: Line 65:
 </code> </code>
  
 +Fetch the page again but this time wait for the reloaded content based on tag attribute
 <code> <code>
-py sget.py "https://www.deckenmalerei.eu/e8a3bf28-6365-42fe-a4d3-41608ed870e8" -b XPATH -v "//div[@class='dataPage']" dataPage.html+py sget.py "https://www.deckenmalerei.eu/e8a3bf28-6365-42fe-a4d3-41608ed870e8" -b XPATH -v "//div[@class='dataPage']" --scroll dataPage.html
 </code> </code>
 +