|  | 
|  | 1 | +# https://www.youtube.com/watch?v=vt2zsdiNh3U | 
|  | 2 | +from seleniumbase import BaseCase | 
|  | 3 | +BaseCase.main(__name__, __file__) | 
|  | 4 | + | 
|  | 5 | + | 
|  | 6 | +class UCPresentationClass(BaseCase): | 
|  | 7 | +    def test_hacking_with_cdp(self): | 
|  | 8 | +        self.open("data:,") | 
|  | 9 | +        self.set_window_position(4, 40) | 
|  | 10 | +        self._output_file_saves = False | 
|  | 11 | +        self.create_presentation(theme="serif", transition="none") | 
|  | 12 | +        self.add_slide("<h2>Press SPACE to begin!</h2>\n") | 
|  | 13 | +        self.add_slide( | 
|  | 14 | +            "<p><h3><mk-0>Coming up on the Hacker Show...</mk-0></h3></p>\n" | 
|  | 15 | +            "<hr /><ul>\n" | 
|  | 16 | +            '<img src="https://seleniumbase.io/other/hackers_at_comp.jpg"' | 
|  | 17 | +            ' width="100%">' | 
|  | 18 | +            "</ul>", | 
|  | 19 | +        ) | 
|  | 20 | +        self.add_slide( | 
|  | 21 | +            "<p><b>Coming up on the Hacker Show...</b></p>\n" | 
|  | 22 | +            "<hr /><br /><ul>\n" | 
|  | 23 | +            "<li><mk-0>Intercepting requests/responses/XHR with CDP." | 
|  | 24 | +            "</mk-0></li><br />\n" | 
|  | 25 | +            "<br /><br />\n" | 
|  | 26 | +            "<br /><br />\n" | 
|  | 27 | +            "<br /><br />\n" | 
|  | 28 | +            "<br /><br />\n" | 
|  | 29 | +            "</ul>", | 
|  | 30 | +        ) | 
|  | 31 | +        self.add_slide( | 
|  | 32 | +            "<p><b>Coming up on the Hacker Show...</b></p>\n" | 
|  | 33 | +            "<hr /><br /><ul>\n" | 
|  | 34 | +            "<li>Intercepting requests/responses/XHR with CDP." | 
|  | 35 | +            "</li><br />\n" | 
|  | 36 | +            "<li><mk-0>Modifying requests: CDP.Fetch.continueRequest." | 
|  | 37 | +            "</mk-0></li><br />\n" | 
|  | 38 | +            "<br /><br />\n" | 
|  | 39 | +            "<br /><br />\n" | 
|  | 40 | +            "<br /><br />\n" | 
|  | 41 | +            "</ul>", | 
|  | 42 | +        ) | 
|  | 43 | +        self.add_slide( | 
|  | 44 | +            "<p><b>Coming up on the Hacker Show...</b></p>\n" | 
|  | 45 | +            "<hr /><br /><ul>\n" | 
|  | 46 | +            "<li>Intercepting requests/responses/XHR with CDP." | 
|  | 47 | +            "</li><br />\n" | 
|  | 48 | +            "<li>Modifying requests: CDP.Fetch.continueRequest." | 
|  | 49 | +            "</li><br />\n" | 
|  | 50 | +            "<li><mk-0>Controlling browsers via remote-debugging-port" | 
|  | 51 | +            "</mk-0></li><br />\n" | 
|  | 52 | +            "<br /><br />\n" | 
|  | 53 | +            "<br /><br />\n" | 
|  | 54 | +            "</ul>", | 
|  | 55 | +        ) | 
|  | 56 | +        self.add_slide( | 
|  | 57 | +            "<p><b>Coming up on the Hacker Show...</b></p>\n" | 
|  | 58 | +            "<hr /><br /><ul>\n" | 
|  | 59 | +            "<li>Intercepting requests/responses/XHR with CDP." | 
|  | 60 | +            "</li><br />\n" | 
|  | 61 | +            "<li>Modifying requests: CDP.Fetch.continueRequest." | 
|  | 62 | +            "</li><br />\n" | 
|  | 63 | +            "<li>Controlling browsers via remote-debugging-port" | 
|  | 64 | +            "</li><br />\n" | 
|  | 65 | +            "<li><mk-0>Bypassing CAPTCHAs & anti-bot defenses." | 
|  | 66 | +            "</mk-0></li><br />\n" | 
|  | 67 | +            "<br /><br />\n" | 
|  | 68 | +            "</ul>", | 
|  | 69 | +        ) | 
|  | 70 | +        self.add_slide( | 
|  | 71 | +            "<p><b>Coming up on the Hacker Show...</b></p>\n" | 
|  | 72 | +            "<hr /><br /><ul>\n" | 
|  | 73 | +            "<li>Intercepting requests/responses/XHR with CDP." | 
|  | 74 | +            "</li><br />\n" | 
|  | 75 | +            "<li>Modifying requests: CDP.Fetch.continueRequest." | 
|  | 76 | +            "</li><br />\n" | 
|  | 77 | +            "<li>Controlling browsers via remote-debugging-port" | 
|  | 78 | +            "</li><br />\n" | 
|  | 79 | +            "<li>Bypassing CAPTCHAs & anti-bot defenses." | 
|  | 80 | +            "</li><br />\n" | 
|  | 81 | +            "<li><mk-0>And live demos of all the above... with Python!" | 
|  | 82 | +            "</mk-0></li><br />\n" | 
|  | 83 | +            "</ul>", | 
|  | 84 | +        ) | 
|  | 85 | +        self.add_slide( | 
|  | 86 | +            "<h2>Get ready for some<br />serious hacking!</h2>" | 
|  | 87 | +        ) | 
|  | 88 | +        self.add_slide( | 
|  | 89 | +            '<img src="https://seleniumbase.io/other/hacking_with_cdp.jpg"' | 
|  | 90 | +            ' width="100%">' | 
|  | 91 | +        ) | 
|  | 92 | +        self.add_slide( | 
|  | 93 | +            '<img src="https://seleniumbase.io/other/cdp.jpg"' | 
|  | 94 | +            ' width="100%">' | 
|  | 95 | +        ) | 
|  | 96 | +        self.add_slide( | 
|  | 97 | +            '<img src="https://seleniumbase.io/other/ms_edp.jpg"' | 
|  | 98 | +            ' width="100%">' | 
|  | 99 | +        ) | 
|  | 100 | +        self.add_slide( | 
|  | 101 | +            '<img src="https://seleniumbase.io/other/vid4_on_yt.jpg"' | 
|  | 102 | +            ' width="100%">' | 
|  | 103 | +        ) | 
|  | 104 | +        self.add_slide( | 
|  | 105 | +            '<img src="https://seleniumbase.io/other/cdp_in_sb.jpg"' | 
|  | 106 | +            ' width="100%">' | 
|  | 107 | +        ) | 
|  | 108 | +        self.add_slide( | 
|  | 109 | +            '<img src="https://seleniumbase.io/other/hacker_news.png"' | 
|  | 110 | +            ' width="100%">' | 
|  | 111 | +        ) | 
|  | 112 | +        self.add_slide( | 
|  | 113 | +            '<img src="https://seleniumbase.io/other/sb_star_history_3.png"' | 
|  | 114 | +            ' width="100%">' | 
|  | 115 | +        ) | 
|  | 116 | +        self.add_slide( | 
|  | 117 | +            '<img src="https://seleniumbase.io/other/top_trending_month.png"' | 
|  | 118 | +            ' width="100%">' | 
|  | 119 | +        ) | 
|  | 120 | +        self.add_slide( | 
|  | 121 | +            '<img src="https://seleniumbase.io/other/cdp_con_req.jpg"' | 
|  | 122 | +            ' width="100%">' | 
|  | 123 | +        ) | 
|  | 124 | +        self.add_slide( | 
|  | 125 | +            '<img src="https://seleniumbase.io/other/mycdp_con_req.jpg"' | 
|  | 126 | +            ' width="100%">' | 
|  | 127 | +        ) | 
|  | 128 | +        self.add_slide( | 
|  | 129 | +            '<img src="https://seleniumbase.io/other/sb_con_req.jpg"' | 
|  | 130 | +            ' width="100%">' | 
|  | 131 | +        ) | 
|  | 132 | +        self.add_slide( | 
|  | 133 | +            '<img src="https://seleniumbase.io/other/xhr_info.jpg"' | 
|  | 134 | +            ' width="100%">' | 
|  | 135 | +        ) | 
|  | 136 | +        self.add_slide( | 
|  | 137 | +            '<h3>The <code>remote-debugging-port</code></h3>' | 
|  | 138 | +            '<img src="https://seleniumbase.io/other/rd_port.jpg"' | 
|  | 139 | +            ' width="100%">' | 
|  | 140 | +        ) | 
|  | 141 | +        self.add_slide( | 
|  | 142 | +            "<h3>Let's get to the fun part...</h3>" | 
|  | 143 | +            '<img src="https://seleniumbase.io/other/hackers_at_comp.jpg"' | 
|  | 144 | +            ' width="80%">' | 
|  | 145 | +        ) | 
|  | 146 | +        self.begin_presentation(filename="uc_presentation.html") | 
0 commit comments