How a Website Works

To webscrape, you'll need to understand how a website works. What makes up the webpage that you see when you open www.facebook.com? Check out Rohan's tutorial on website structure here.


HTML, CSS, JavaScript

To write a Python script, you make a .py file and then ask Python to run it. To make a website, you make a collection of .html,.css, and .js files, and then you ask your browser to run those files.

For webscraping, you will only really need to be familiar with HTML. An HTML file tells your browser what the basic structure of your website is going to look like. Where is the heading? What's inside that table? Where should I put this image? An HTML file answers all of those questions for a browser.

A CSS file styles a website. What should the border of this table be? What should this font be? Etc.

A JavaScript file lets you write scripts just like in Python and controls the webpage and adds interactivity. If I need to take in user input and validate it to make sure it's correct using string functions. Javascript will let you do that.

Check out w3schools for a rundown of these languages. You should definitely check out HTML since it is required for webscraping, but if you are curious be sure to check out CSS and JavaScript tutorials too!

At this point, you're ready to read the language of the web! It's important that you can understand this, otherwise you won't be able to write code that understands it!

results matching ""

    No results matching ""