r/Python • • Nov 28 '20

Intermediate Showcase "Sillynium" - Auto generate working Python Selenium scripts by drawing coloured rectangles around web elements on a page that you want to automate

TLDR: 60 sec video here:https://streamable.com/1y17lt

TLDW: When I want to automate actions on a site, such as logins or forms, or scraping pages with JavaScript, I manually inspect each web element I need and begin writing a script.

I'm lazy though and had the idea to automate the creation of these automation/testing scripts. And thus "Sillynium" was born.

Sillynium allows you to draw boxes around the elements you require on a page and automatically gets the element and its properties for you. Different coloured rectangles tell the program you want to do different things. Eg: Red means "Input text", Green means "Click button".

When you've finished drawing boxes, a working python selenium script is generated. If you run that script, it does exactly what you told it to do! All this without you writing any code, and losing time.

Working 60 second video link of program in action: https://streamable.com/1y17lt

I made this project over the course of a day as a quick and dirty proof of concept. Its very flawed in its current iteration (taking a screenshot of webpage), so V2 I'm trying to figure out how to draw directly to the browser. Critique it and rip it to shreds. I'm aware of browser recorders btw so I know those exist, this is my twist on automation

Edit: I was not prepared for the amount of interest in this little proof of concept! So thank you all very much for your time you’ve made my day :)

In the interest of transparency and to answer your questions about the code and my plans:

I originally thought about monetisation (web extension etc) after finishing this POC (**sigh i know I’m a greedy bastard) but now I’m in 2 minds about it!

On the one hand I want to make it free for personal use, on the other hand I’d like to potentially charge for commercial use (once its finished).

Final edit 2 The community has spoken, I WILL BE RELEASING THIS VERSION AS OPEN SOURCE! I did some light refactoring, and have added it to a repo which will be shared in a follow up. It shows the POC and the community is welcome to build on the original idea :)

I will create a follow up post with links to repo once I’ve created it, this will be my first project on GitHub so try be nice ;) pretty nervous about sharing my code :D

Thank you all for your patience, interest, and awesome discussions

1.5k Upvotes

171 comments sorted by

View all comments

•

u/Im__Joseph Python Discord Staff Nov 28 '20

Hey there!

Going by the responses to this post it seems a lot of people are impressed with your project, myself included!

We won't be removing this post, but I'd like to draw your attention to rule 5 of the subreddit which concerns showcase flairs.

If possible it would be really great to include some form of source code on a platform like GitHub, this allows projects posted here to be educational for all.

We may enforce rule 5 automatically at some point in the future, but for now we'll keep this up since it's generated some nice discussion.

Cheers,

Joe

10

u/[deleted] Nov 28 '20

Hey thanks so much Joseph! I will keep that in mind apologies on that one :) just working on my decision re my edit as to sharing the code, as i do want it to be educational (it was really fun to code). Honestly I never expected this much traction and am a bit overwhelmed 😃 cheers!

7

u/Im__Joseph Python Discord Staff Nov 28 '20

No worries!

Nice project, congrats your fame

!

10

u/Matthew4588 Nov 28 '20

Wait you can put Gifs in comments?!

Edit:

Holy fuck you can!

6

u/Im__Joseph Python Discord Staff Nov 28 '20

If you are a subreddit hero, yep! See this post.

2

u/DreadStallion Dec 09 '20

Woahhhhh... My first gif comment. Gotta make it count

1

u/Matthew4588 Dec 09 '20

This takes Rick rolling to a whole new level

1

u/[deleted] Nov 28 '20

Cheers 😁😁

2

u/[deleted] Nov 29 '20

Releasing as open source :)

3

u/Im__Joseph Python Discord Staff Nov 29 '20

Fantastic to hear! Thank you!

Looking forward to your next post :)

2

u/RandyPlzStop Nov 29 '20

Where be the link-arino!

Also will this be able to handle repeating content selections?

I.e like grab as many images that are shown on this page or whatever?

2

u/[deleted] Dec 07 '20

Yes it will, it can grab ALL content so it has that over a recording tool

1

u/slallum Dec 07 '20

Nice. Will you publish a link soon? :)

1

u/[deleted] Nov 28 '20

[removed] — view removed comment

1

u/Im__Joseph Python Discord Staff Nov 28 '20

Hey! The rules should be visible down the sidebar underneath community information. Are you on old Reddit/new Reddit/Mobile? It may be that we've put them in a place on new Reddit which other Reddit clients don't see.

1

u/[deleted] Nov 29 '20

[removed] — view removed comment

2

u/Im__Joseph Python Discord Staff Nov 29 '20

Found it now, Old Reddit has them but does not link to them automatically. I've put a note in the sidebar linking here