Did you notice our Python tips lately? They looks more sexy, don’t they? That’s thanks to Carbon which lets you create beautiful images of your source code. As much as I love its interface though, what if we can automate this process generating the image for us? That’s what we did and posting new tips to Twitter is now a breeze. In this article I will show you how using a bit of BeautifulSoup and selenium. Enjoy!
Author
Bob Belderbos
Latest articles
by
-
-
Ever wondered how you scrape hidden (or JS generated) HTML? Selenium is your friend. Ever wondered how to run it without a browser popping up? Use headless mode. How would you run it remotely? Use Heroku. And how about autoposting to Slack and Twitter? With the right libraries and API setup little code is needed. In this 10 step guide I will show you how to build a Packt Free Learning Notifier which will accomplish all these tasks. Ready to learn some nice automation skills in Python?
-
In this short article I will show you how to use dateutil’s parse, relativedelta and rrule to make it easier to work with datetimes in Python.
-
In this article I will show you how to test a Django app with pytest and Selenium. We will test our CodeChalleng.es platform comparing the logged out homepage vs the logged in dashboard. We will navigate the DOM matching elements and more. Overall you should learn enough Selenium and pytest to start testing a web page including a login. Sounds exciting? Let’s dive straight in!
-
In this post I share a quick script I produced last week to automate a portion of our review post. There are some nice idioms that you might find useful.
-
What makes you excel in your career? Become an expert in x, y, z. Sure, you need to learn technical skills, quite a lot of them. However there is a lot more to it. If you want to succeed in your job, business and life, you want to build a portfolio, share your learning, become a reader and a good writer, and last but not least stick to daily exercising. I published this article on my blog 2 years ago and find a lot is still relevant today and will serve our community. I also added an updated towards the…
-
Enough pytest to be Dangerous, 10 Things I Learned Writing Tests for 100 Python (Bites of Py) Exercises
·
·
10 min readWe hit 100 Bite exercises on our Code Platform and that means we have written tests for 100 exercises. In this article I share 10 things I learned about writing test code and pytest.
-
Setting up test cases for code that manage data can be challenging but it’s an important skill to reliably test your code. You might have heard of the setup and teardown methods in unittest. In pytest you use fixtures and as you will discover in this article they are actually not that hard to set up. Fixtures have been labelled pytest’s killer feature so let’s explore them in this article using a practical example.
-
Yesterday we hosted PyChallengeDay together with Python Alicante. I am sure the folks that joined us stretched their coding skills. And we learned a couple of things too which we will share in this article. Hopefullly it inspires you to host a workshop yourself to grow the awesome Python community.