by doitwithcode | Jan 19, 2021 | Python
In this video tutorial, we covered how to scrape Instagram image and video posts. The JSON provided by Instagram for album/carousel posts is a little different. Let’s take a look at an Instagram album post such as https://www.instagram.com/p/CBIvNwGB2IX/. By...
by doitwithcode | Dec 21, 2020 | Python
In a previous tutorial, we built an Instagram Scraper with Python. This method scrapes meta tags from the post content and these tags had links to the image or video for the post. This method however no longer works. We can however get the same content ( image or...
by doitwithcode | Feb 21, 2020 | Blog, Python
Suppose I want to create a Selenium script that logs into Facebook, I would first have to log in to Facebook by instructing Selenium to fill out the login form below However, instead of spending time to write code for the login ( fill in the form and click on Log in...
by doitwithcode | Feb 19, 2020 | Blog, Python
A Python module is a file or group of files that contain function definitions and statements. A module can be created by creating a .py file. For instance, we can create a file hello.py with the following code: def say_hello(): print(“Hello World!”) We can...
by doitwithcode | Feb 12, 2020 | Blog, Python
Python 3 has a built-in method for accepting user input. Let’s take a look at how to implement this. We want to accept two numbers from a user then return the product of both number1 = input(“What is the first number? “) number2 = input(“What...
by doitwithcode | Feb 4, 2020 | Blog, Python
The function below sums up two numbers with Python: def addition( a , b ): return a + b print( addition( 4, 5 ) ) print( addition( 2, 2.5 ) ) The function will work with integers and floats. If however the function is run with an integer and a string, the following...