From 20563e034b676ca69af1a618d543e3469660edd7 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sat, 11 Jan 2025 11:05:41 -0500 Subject: [PATCH] Add presentation about web-scraping on GHA --- examples/presenter/web_scraping_on_gha.py | 247 ++++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 examples/presenter/web_scraping_on_gha.py diff --git a/examples/presenter/web_scraping_on_gha.py b/examples/presenter/web_scraping_on_gha.py new file mode 100644 index 00000000000..7ba9889fb78 --- /dev/null +++ b/examples/presenter/web_scraping_on_gha.py @@ -0,0 +1,247 @@ +from seleniumbase import BaseCase +BaseCase.main(__name__, __file__) + + +class UCPresentationClass(BaseCase): + def test_hacking_with_cdp(self): + self.open("data:,") + self.set_window_position(4, 40) + self._output_file_saves = False + self.create_presentation(theme="serif", transition="none") + self.add_slide("

Press SPACE to begin!

\n") + self.add_slide( + "

Coming up... on the Hacker Show:

\n" + "
\n' + "

\n" + "

\n", + ) + self.add_slide( + "

Coming up... on the Hacker Show:

\n" + "

" + '', + ) + self.add_slide( + "

Coming up... on the Hacker Show:

\n" + "

\n" + '\n' + "

\n" + "

\n", + ) + self.add_slide( + "

Coming up... on the Hacker Show:

\n" + "

\n" + '' + "

\n" + ) + self.add_slide( + "

Coming up... on the Hacker Show:

\n" + "

\n" + '' + "

\n", + ) + self.add_slide( + "

Coming up... on the Hacker Show:

\n" + "

", + ) + self.add_slide( + "

Get ready for some serious hacking!

" + '' + ) + self.add_slide( + '' + ) + self.add_slide( + "

And YES, that means bypassing bot-detection!" + '' + ) + self.add_slide( + "

But first, a little bit about me...

" + '' + ) + self.add_slide( + "

About me: (Michael Mintz)

\n" + "" + '' + ) + self.add_slide( + "

Fun Fact


\n" + "

I once showed SeleniumBase to Sam Altman at MIT.
" + "(Sam Altman cofounded OpenAI with Elon Musk.)" + '' + ) + self.add_slide( + "

Recently, SeleniumBase was trending on GitHub:" + "

\n" + '' + ) + self.add_slide( + "

The recent popularity can be attributed to CDP Mode," + "
which provides advanced stealth during automation.

" + '' + ) + self.add_slide( + "

That stealth is enough to bypass bot-detection
" + "while web-scraping from GitHub Actions:

" + '' + ) + self.add_slide( + "

GitHub Actions is free for public repositories:

" + '' + ) + self.add_slide( + '' + ) + self.add_slide( + "

To hide sensitive information while using" + "
GitHub Actions for open-source projects," + "
there's a feature called: GitHub Secrets.

" + "
" + "

That removes the limitation" + r"
of being 100% open-source," + r"
while still being 100% free.

" + ) + self.add_slide( + '' + ) + self.add_slide( + '' + ) + self.add_slide( + '' + ) + self.add_slide( + '' + ) + self.add_slide( + '' + ) + self.add_slide( + "

And that's the secret
to GitHub Secrets!

" + ) + self.add_slide( + "

Up next:

" + "
" + "

Instant proxy server

" + "
" + "

(Faster to launch than making Instant Coffee!)" + ) + self.add_slide( + '

"sbase proxy"

' + "
" + "

(That's it!)

" + "
" + '' + ) + self.add_slide( + '

More configuration options for "sbase proxy":

' + '' + ) + self.add_slide( + "

The proxy server code comes from proxy.py:

" + '' + ) + self.add_slide( + "

" + "Here's how to configure a proxy with SeleniumBase:" + "