The first production Google crawler, unfortunately named "Backrub", was written using Python back when the language was fairly new. It’s no secret that the SEO community has glommed onto Python as a promising programming language that provides us something relatively easy to learn and a great number of valuable features, ready-to-use packages, and native publishing outlets. Find out what makes Python so powerful for the SEO community and get inspired with projects that automate and assist data tasks that we all get into as SEO practitioners.
After this session, you'll be able to:
Discover how easy it is to learn a little Python from "100-days of code" projects
Come away with useful automation projects you can tweak when back at work
Know where to get help, learn more, or engage the community by sharing your projects
10. @SPEAKERNAME/#SMX
● General purpose programming language
● Interpreted line by line
● Object orientated
● Designed to be readable
● Open source
● Interactive
What is Python?
@rvtheverett @deepcrawl #SMX
14. @SPEAKERNAME/#SMX
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 #SMX
15. @SPEAKERNAME/#SMX
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 #SMX
16. @SPEAKERNAME/#SMX
Codecademy
● 20 week online course
● Mixture of theory and practical
● A range of projects to undertake
● Code console & terminal to play and test
@rvtheverett @deepcrawl #SMX
17. @SPEAKERNAME/#SMX
Data Camp
● Wide range of skill
tracks
● Interactive exercises
● Instant explanations
● Challenges and
projects
@rvtheverett @deepcrawl #SMX
18. @SPEAKERNAME/#SMX
Solo Learn
● Free mobile app
● Learn Python on the
go
● Over 200 practice
questions
● Code Playground
@rvtheverett @deepcrawl #SMX
23. @SPEAKERNAME/#SMX
Data extraction & analysis
Scientific Computing
Natural Language Processing
Machine Learning
Python Libraries
@rvtheverett @deepcrawl #SMX
24. @SPEAKERNAME/#SMX
Pandas
● Pandas is a Python module for working with tabular data
● Allows for high-level data manipulation
● Built on the Numpy package
● Key data structure is a DataFrame
● Handling DataFrames is Pandas’ version of a spreadsheet
● Not limited to Excel’s row and byte limits
● Much faster and more efficient compared to Excel
@rvtheverett @deepcrawl #SMX
26. @SPEAKERNAME/#SMX
Requests
● Used to make HTTP requests in Python.
● Abstracts the complexities of making requests behind a
beautiful, simple API
● Uses different HTTP methods such as GET and POST to make a
HTTP request
@rvtheverett @deepcrawl #SMX
30. @SPEAKERNAME/#SMX
Beautiful Soup
● A Python library for pulling data out of HTML and XML files.
● Often used for web scraping
● Transforms a complex HTML document into a complex tree of
Python objects, such as tag, navigable string, or comments
@rvtheverett @deepcrawl #SMX
34. @SPEAKERNAME/#SMX
● Automating repetitive tasks
● Data extraction and
analysis to solve complex
problems
● Efficiency and time-saving
● Future-proofing your job
Why Should You Care?
@rvtheverett @deepcrawl #SMX
45. @SPEAKERNAME/#SMX
● Better understand data
● Make data driven decisions
● Provide concrete insights
● Confidence in recommendations
● Allowing us to focus on other important optimisation efforts
Why Python is Growing in Popularity
@rvtheverett @deepcrawl #SMX
57. @SPEAKERNAME/#SMX
Pure Python using the Pillow library
optimize-images filename.jpg
Optimise a single image
optimize-images ./
Optimise a folder with multiple images
Github Link
Optimise Images
@rvtheverett @deepcrawl #SMX
77. @SPEAKERNAME/#SMX
Internal Link Analysis
Identify which sections of the site are linked to the most. Does this
impact performance? Are there sections we can improve with
internal linking?
@rvtheverett @deepcrawl #SMX
88. @SPEAKERNAME/#SMX
Merging Crawl Data with GSC Data
Merging Google Search Console data (impressions, clicks, CTR,
position with crawl data and metrics such as internal links.
@rvtheverett @deepcrawl #SMX
89. @SPEAKERNAME/#SMX
Merging Crawl Data with GSC Data
Merging Google Search Console data (impressions, clicks, CTR,
position with crawl data and metrics such as internal links.
@rvtheverett @deepcrawl #SMX
90. @SPEAKERNAME/#SMX
Page Speed Insights API
Measure key performance metrics at scale, in order to save time
spent manually testing each URL using Google’s Page Speed
Insights API.
@rvtheverett @deepcrawl #SMX
96. @SPEAKERNAME/#SMX
Core Web Vitals Analysis
On a template basis to identify pages performing worst and which
need to be prioritised.
@rvtheverett @deepcrawl #SMX
97. @SPEAKERNAME/#SMX
Core Web Vitals Analysis
On a template basis to identify pages performing worst and which
need to be prioritised.
@rvtheverett @deepcrawl #SMX
98. @SPEAKERNAME/#SMX
Core Web Vitals Analysis
On a template basis to identify pages performing worst and which
need to be prioritised.
@rvtheverett @deepcrawl #SMX
99. @SPEAKERNAME/#SMX
Core Web Vitals Analysis
On a template basis to identify pages performing worst and which
need to be prioritised.
@rvtheverett @deepcrawl #SMX
100. @SPEAKERNAME/#SMX
Google Trends
Automate the process of downloading different reports from
Google Trends to collect data using the different methods available
within the Pytrends API
@rvtheverett @deepcrawl #SMX
Interest over time
Suggestions
103. @SPEAKERNAME/#SMX
NLP
Google’s NLP Model
Natural Language uses machine learning to reveal the structure and meaning of text.
Analyses text to understand the sentiment, as well as extract key information.
https://cloud.google.com/natural-language/ @rvtheverett @deepcrawl #SMX
109. @SPEAKERNAME/#SMX
Create a bot using Python,
Telegram and RandomDog API
https://www.practicepython.org/
https://realpython.com/pygame-a-primer/
https://inventwithpython.com/pygame/
Other Fun Projects
@rvtheverett @deepcrawl #SMX
124. @SPEAKERNAME/#SMX
Python can help technical SEOs
increase their 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.
Key Takeaway
@rvtheverett @deepcrawl #SMX