My Authors
Read all threads
It’s #RSTwittorial Thursday! 🙌 Today we’re Generating a Rendered #HTML Diff Report using #Python 🐍🔥

Here’s the output 👇
What are we learning? 👨‍🏫

🧠 How to generate a visual report showing the difference between the raw HTML and the JavaScript Rendered HTML using the requests_html Python library 🐍🔥
Why is it practical? 🧐

🔍 When webpages use #JavaScript, the HTML rendered on the client-side 🧑‍💻 could be different from the raw HTML coming from the server-side ⌨️

🔍 Creating a diff allows you to quickly see 👀 the JavaScript changes 🖥️ (great for JavaScript #SEO!)
What you’ll need:

💻 A free @replit account
🔧 A tool to open zip files
⏱️ 5-10 minutes
Let’s get started! 🤓

Access the code here in this GitHub folder: github.com/ranksense/Twit…
1️⃣ Click on the repl.it link in the “README” file in the GitHub folder to open the code on your browser

🖱️Click “fork” at the top of the repl if you want to save a personal copy of the project
2️⃣ Click the green “run” button at the top of the screen and wait for the required package installations to finish⌛️
3️⃣ When you see the prompt to enter a URL, right-click on the console and paste your URL

🖱️Hit enter in order to generate the diff

🗒️Note: Repl.it will start installing chromium
4️⃣ Once you see the “Done!” message, click on the 3 dots next to “Files” and “download as zip”

🗒️ Note: You may see a warning saying, “U mode is deprecated”

🙆‍♂️ You can ignore this warning
5️⃣ Open the zip file and double click on the “diff.html” file

💻 This should open up the diff file on your browser

Congrats, you’re finished! 🥂
🗒️ Note: Oftentimes the HTML is large so you may need to scroll horizontally to see both parts of the diff file

🗃️ Find more information on how the diff is presented in the “README” file on GitHub
Here’s the homework:

🛠 Use your knowledge of the previous #RSTwittorials to read URLs from a #GoogleSheet instead of manually pasting a URL into the console 🛠
Leave us your comments, concerns, and questions below!

@Anirudh_Tata, our Technical Support Intern and creator of the code, will be happy to answer! 👨‍💻

Find him on LinkedIn 👇 linkedin.com/in/anirudh-tat…
Good luck!🤞
Missing some Tweet in this thread? You can try to force a refresh.

Keep Current with RankSense

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!