Ruth Everett
Technical SEO & Content Executive
@rvtheverett
Tackling Python: What is it
and how can it help with
Technical SEO?
@rvtheverett@DeepCrawl
@rvtheverett@DeepCrawl
Allow: /dogs
Allow: /SEO
Allow: /python
My coding partner in crime
@rvtheverett@DeepCrawl
PROBLEM
SEOs are busy
@rvtheverett@DeepCrawl
SOLUTION
Automation
@rvtheverett@DeepCrawl
Enter Data Analysis & Automation
with Python
My journey with Python
What We’ll Cover
Using Python
How Python can help with
Technical SEO
@rvtheverett@DeepCrawl
@rvtheverett@DeepCrawl
MY JOURNEY
WITH PYTHON
Before
@rvtheverett@DeepCrawl
INSPIRATION IN THE INDUSTRY
@rvtheverett@DeepCrawl
@hamletbatista @BritneyMuller
https://www.slideshare.net/Muller-Marketing-Inc/machine-learning-for-
marketers-ctaconf-2019
https://www.searchenginejournal.com/author/hamlet-batista/
INSPIRATION IN THE INDUSTRY
@rvtheverett@DeepCrawl
Paul Shapiro
https://moz.com/blog/programming-for-seos
Tyler Reardon
https://www.slideshare.net/TylerReardon2/advanced-technical-seo-in-
2020-data-science
SCALING AUTOMATED QUALITY TEXT GENERATION WEBINAR
@rvtheverett@DeepCrawlhttps://www.deepcrawl.com/blog/webinars/scaling-automated-quality-text-generation-for-enterprise-sites/
COMPANIES USING PYTHON
@rvtheverett@DeepCrawl
COMPANIES USING PYTHON
"Python has been an important part of Google
since the beginning, and remains so as the
system grows and evolves. Today dozens of
Google engineers use Python, and we're
looking for more people with skills in this
language."
@rvtheverett@DeepCrawl
COMPANIES USING PYTHON
"Python is fast enough for our site and
allows us to produce maintainable
features in record times, with a minimum
of developers"
@rvtheverett@DeepCrawl
CODECADEMY
@rvtheverett@DeepCrawl
20 week online course
Mixture of theory and practical
A range of projects to undertake
Code console & terminal to play and test
CODECOMBAT
@rvtheverett@DeepCrawlhttps://codecombat.com/
CODEWARS
@rvtheverett@DeepCrawlhttps://www.codewars.com/join
Now
@rvtheverett@DeepCrawl
@rvtheverett@DeepCrawl
WHAT IS PYTHON?
WHAT IS PYTHON?
Code written in the
terminal
@rvtheverett@DeepCrawl
Results generated
Open-source interactive programming
language
Interpreted line by line
USING PYTHON
Mac - Terminal Windows - Command Line
@rvtheverett@DeepCrawl
USING PYTHON
@rvtheverett@DeepCrawl
Google Colab
USING PYTHON
@rvtheverett@DeepCrawl
Jupyter Notebook
PYTHON LIBRARIES
@rvtheverett@DeepCrawl
Data extraction & analysis
Scientific Computing
Natural Language Processing
Machine Learning
@rvtheverett@DeepCrawl
HOW PYTHON
CAN HELP WITH
TECHNICAL SEO
WHY SHOULD WE CARE?
@rvtheverett@DeepCrawl
Data extraction and analysis
to solve complex problems
Future-proofing your job
Write compelling stories from
insights
Efficiency and time-saving
Automating repetitive tasks
https://www.ranksense.com/empowering-a-new-generation-of-seos-with-python/
WHY SHOULD WE CARE?
@rvtheverett@DeepCrawl
Spend 5 hours a week using excel
Thats 20 hours a month
Over 200 hours a year
(35 hours in dog time)
(140 hours in dog time)
(1400 hours in dog time)
WHY SHOULD WE CARE?
@rvtheverett@DeepCrawl
Average salary for a Technical
SEO Executive in the UK:
£25,000
Average £12 per hour
£2,400 you could save
WHY SHOULD WE CARE?
@rvtheverett@DeepCrawl
Imagine what we could
achieve if we spent
this time (and money)
on other important
tasks
@rvtheverett@DeepCrawl
WHY IS PYTHON GROWING IN POPULARITY IN THE SEO SPACE?
Make data driven decisions
Allowing us to focus on other
important optimisation efforts
Confidence in recommendations
Provide concrete insights
Better understand data
AUTOMATING WITH PYTHON
@rvtheverett@DeepCrawl
Automating with
Python
Parameter
Finder
404
Checker
Internal Linking
Analysis
Image
Optimisation
Website
Scraping
Keyword
Research
@rvtheverett@DeepCrawl
CHALLENGE - MISSING ALT TEXT
SOLUTION - IMAGE CAPTIONING
WITH PYTHIA
IMAGE CAPTIONING WITH PYTHIA
@rvtheverett@DeepCrawl
Pythia Modular
Framework
https://paperswithcode.com/paper/bottom-up-and-top-down-attention-for-image
https://learnpythia.readthedocs.io/en/latest/
@rvtheverett@DeepCrawl
IMAGE CAPTIONING WITH PYTHIA
Google Colab Link
@rvtheverett@DeepCrawl
IMAGE CAPTIONING WITH PYTHIA
It’s not perfect though!
@rvtheverett@DeepCrawl
IMAGE CAPTIONING WITH PYTHIA
@rvtheverett@DeepCrawl
CHALLENGE - ON-PAGE ERRORS
SOLUTION - SEO ANALYZER
SEO ANALYZER
@rvtheverett@DeepCrawl
Provides a quick analysis of basic
SEO issues
Once installed you can analyze a
website starting from the homepage
seoanalyze https://domain.com/
Or the XML sitemap of the file
seoanalyze https://domain.com --
sitemap
https://domain.com/sitemap.xml
Github Link
@rvtheverett@DeepCrawl
Will display things including;
Word Count
Page Title
Meta Description
Warnings for missing titles,
descriptions and alt-text
SEO ANALYZER
@rvtheverett@DeepCrawl
CHALLENGE - BROKEN PAGES
SOLUTION - CRAWL404
CRAWL404
@rvtheverett@DeepCrawl
Once you specify the sitemap the
script will;
Read the sitemap.xml file
Search for ‘href’ attribute to get
all the valid links from every page
Check the link response code
Export all 404 error URLs to a text
file
Github Link
CRAWL404
@rvtheverett@DeepCrawl
@rvtheverett@DeepCrawl
CHALLENGE - LARGE IMAGE FILE
SIZES
SOLUTION - OPTIMISE IMAGES
OPTIMISE IMAGES WITH PILLOW
@rvtheverett@DeepCrawl
Pure Python using the Pillow library
This script does optimise
images destructively
optimize-images filename.jpg
Optimise a single image
optimize-images ./
Optimise a folder with multiple images
Github Link
OPTIMISE IMAGES WITH PILLOW
@rvtheverett@DeepCrawl
OPTIMISE IMAGES WITH PILLOW
@rvtheverett@DeepCrawl
Original Optimised
OTHER POSSIBILITIES
@rvtheverett@DeepCrawl
Log File analysis
Validate hreflang
Calculate keyword growth using
Google Trends
Collect Google Search Console
data
Perform competitor analysis
Other fun Python projects
@rvtheverett@DeepCrawl
Create a bot using Python,
Telegram and RandomDog API
https://www.practicepython.org/
https://realpython.com/pygame-a-primer/
https://inventwithpython.com/pygame/
POWERING MACHINE LEARNING
@rvtheverett@DeepCrawl
“Machine learning is an application of artificial intelligence (AI) that
provides systems the ability to automatically learn and improve from
experience without being explicitly programmed.”
https://www.expertsystem.com/machine-learning-definition/
POWERING MACHINE LEARNING
@rvtheverett@DeepCrawlhttps://www.expertsystem.com/machine-learning-definition/
Run a python
script to train
the computer,
using a dataset
Summarise
and Visualise
the dataset
Evaluate the
algorithms
Make
Predictions
REAL WORLD MACHINE LEARNING EXAMPLES
@rvtheverett@DeepCrawl
SEO POSSIBILITIES WITH MACHINE LEARNING
@rvtheverett@DeepCrawl
SEO Possibilities with
Machine Learning
Evaluating
Content Quality
Log File
Analysis
Automating Meta
Descriptions
Title Tag
Optimisation
User Engagement
Insights
Audio
Transcribing
@rvtheverett@DeepCrawl
THE FUTURE OF SEO
Understand and solve problems
faster
@rvtheverett@DeepCrawl
THE FUTURE OF SEO
Make data driven decisions
@rvtheverett@DeepCrawl
THE FUTURE OF SEO
Focus on other important
optimisation activities
TALK TO YOUR
DEVELOPERS
JOIN COMMUNITIES
https://pyslackers.com/web
https://www.100daysofcode.com/
KEEP PRACTICING AND
HAVE FUN
KEY TAKEAWAYS
@rvtheverett@DeepCrawl
Python can help technical SEOs increase
efficiency.
Being able to better understand data will lead
to better decisions being made.
Anyone can learn Python, with a little
commitment. Have fun with it and see what
you can create.
USEFUL RESOURCES
@rvtheverett@DeepCrawl
https://www.python.org/
https://www.searchenginejournal.com/python-seo-data-reference-guide/287927/
https://www.searchenginewatch.com/2019/02/06/using-python-to-recover-seo-site-traffic-part-one/
https://cs109.github.io/2015/
https://www.deepcrawl.com/blog/webinars/scaling-automated-quality-text-generation-for-enterprise-sites/
https://automatetheboringstuff.com/
https://medium.com/machine-learning-for-humans/why-machine-learning-matters-6164faf1df12
https://towardsdatascience.com/beginners-guide-to-machine-learning-with-python-b9ff35bc9c51
https://www.searchenginejournal.com/python-technical-seo/330515/
Ruth Everett
Technical SEO & Content Executive
@DeepCrawl
@rvtheverett
THANK YOU
@DeepCrawl

Tackling Python: What is it and How Can it Help with Technical SEO? | TechSEO Summat October 2019 | Ruth Everett