Python

Sub Categories

>> Colaboratory >> Web Scraping
Featured image for Analysing Subreddit's Keyword Concentration with Python and PRAW

Analysing Subreddit's Keyword Concentration with Python and PRAW

27 Sep 2020

The Python Reddit API wrapper is a quick-and-easy way to scrape and analyse the content of Reddit whilst also allowing the building of bot apps. In this post, we will utilise a few easy lines of code to analyse the keyword frequency in several subreddits via TF-IDF analysis and wordcloud ...

Featured image for Scraping Internal Links from Entire Domain

Scraping Internal Links from Entire Domain

14 Sep 2020

Being able to collate all active links in a domain can be helpful either to build a sitemap or for competitive analysis. One way to achieve that is via Python with BeautifulSoup. In this quick post, I'll demonstrate a way to recursively gather links in a domain. The links gathered ...

Featured image for Using Graph Theory for Keyword Ideas Expansion via Networkx

Using Graph Theory for Keyword Ideas Expansion via Networkx

09 Jun 2020

Following up on the previous post on generating a mass amount of keywords, we'll use Graph Theory to help identify several keyword themes worth exploring. Identifying themes is useful for: Content Generation for website content or guest blogging SEO ranking focus or identifying backlink anchor texts to use Paid search keyword targeting ...

Featured image for Keyword Generator via Google Autocomplete

Keyword Generator via Google Autocomplete

01 Jun 2020

Google's Autocomplete function is populated by Google based on the vast knowledge they have on their users' search pattern. Often, they are based on searches often made by other users. Due to that, we can leverage that to build a powerful keyword tool that can be useful for your paid ...

Featured image for Identifying the Right Element Location when Scraping with BeautifulSoup

Identifying the Right Element Location when Scraping with BeautifulSoup

02 Feb 2020

Scraping usually involves identifying the right location of the element, and then passing that information (e.g. CSS Selector or Xpath) to a scraping code to automate the process. However, there are occasions when you thought you have identified the right selector by using "Inspect" feature on the website, but the ...

Featured image for Finding SEO Backlink Opportunities with Python

Finding SEO Backlink Opportunities with Python

26 Feb 2019

Having a strong pool of good backlinks is key in building a good organic search ranking and is a general SEO practice. We will use some basic Python code to gather a list of potential backlinks from websites that have mentioned your brand but has not linked to your website. ...

Featured image for 2018 Trending English Searches on Google - Google Trends

2018 Trending English Searches on Google - Google Trends

30 Dec 2018

As 2018 comes to an end, it's a great time for a reflection and to take a look at what has happened this year. Though it can be a shitty, weird or bad year, it's still good to look back at all the conversations that have happened this year. One ...

Featured image for Scraping Search Results from Google Search

Scraping Search Results from Google Search

21 Nov 2018

Scraping search results from Google Search can be used for many things. It can be used for sentiment analysis, competitor analysis and search engine optimisation (SEO). In this post, I'll cover how to scrape Google search results for a start. Setting Up the Scope Firstly, we'll set up some parameters ...

Featured image for Using YouTube API to Analyse YouTube Comments on Python

Using YouTube API to Analyse YouTube Comments on Python

05 Nov 2018

YouTube comments are often fun to read while its anonymity also helps to provide some deep insight into some issues from both ends of the argument/discussion. It does house some of the funniest comments you'll find online too. YouTube API is a free-to-use API for anyone who's keen to capture ...

Featured image for Error Handling in Selenium on Python

Error Handling in Selenium on Python

14 Oct 2018

Selenium is a very versatile web scraping tool that is accessible via multiple programming languages. It's distinguished from text-parsing scrapers like BeautifulSoup as it actually simulates a web navigation experience, enabling you to scrape website running on a lot of Javascript and iframes. That makes Selenium especially powerful when you ...

Featured image for Importing Your Own Python Module or Python File in Colaboratory

Importing Your Own Python Module or Python File in Colaboratory

30 Apr 2018

It's a good practice to keep your code modular to enhance its value and applicability to a wider range of use cases. It also helps to make your Python script shorter, reduces clutter and easier to understand. Readers of your code only need to know the purpose of you calling the ...

Featured image for Make Your Colaboratory Code Easier to Use with Form Input

Make Your Colaboratory Code Easier to Use with Form Input

23 Apr 2018

I find the forms function on Colaboratory extremely useful when you're sharing your Colaboratory notebook for a wider audience. Some users might not really understand Python to edit the variables for their use cases safely. Hence, the forms function provides a dialogue-box interface to enable editing of variables via an ...

Featured image for Intro to Colaboratory and Linking it to Google Sheets

Intro to Colaboratory and Linking it to Google Sheets

16 Apr 2018

Colaboratory is an amazing new tool built by Google that is a Jupyter notebook running on Python 2 or Python 3 ran entirely on the Cloud. The main advantages I find to using Colaboratory are: Very easy to share your code: Just share it like any Google Drive files It's fast: I've ...

Featured image for Scheduling a Python Script to Run Upon Boot at a Predefined Time (Windows)

Scheduling a Python Script to Run Upon Boot at a Predefined Time (Windows)

09 Apr 2018

Running a Python script on a schedule can be useful, either for scheduled data mining or updating of a dashboard on Google Sheets. There are cloud solutions out there, but there's a simple GUI version of a scheduler for scripts on Windows that can be used. The programme is included ...

Featured image for Keyword Network Analysis with Python and Gephi

Keyword Network Analysis with Python and Gephi

11 Mar 2018

One of the key techniques when analysing keyword, headline or any text-related data is to find the connection between terms. Such analysis is called Network Theory or Graph Theory. In its simplest term, we are going to do a co-occurrence analysis between words. This can be extremely useful for discovering the ...

Featured image for Pulling Data from DoubleClick Search Directly into Python

Pulling Data from DoubleClick Search Directly into Python

04 Mar 2018

Pulling data direct from the data source itself unlocks plenty of possibilities. For those using DoubleClick Search (DS3), it's best to pull data directly from DS3 when working with search engine marketing (SEM) data if we're hoping to do some data manipulation. Google's documentation isn't the best - I've seen ...

Featured image for Overpower Your Google Sheets with Python

Overpower Your Google Sheets with Python

26 Feb 2018

This post is updated on Jan 2019 following the version 2.0 release. Google Sheets by itself is just another spreadsheet application much like Excel. With Google Apps Script, it becomes a spreadsheet application with VBA-like features but (in my opinion) is easier to use. With the multitude of add-ons, it ...