Skip to content

Commit 27aecab

Browse files
committed
fix: update devtools 1 to be about JS
1 parent e3e49b2 commit 27aecab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sources/academy/webscraping/scraping_basics_javascript2/01_devtools_inspecting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Now let's peek behind the scenes of a real-world website—say, Wikipedia. We'll
3030

3131
![Wikipedia with Chrome DevTools open](./images/devtools-wikipedia.png)
3232

33-
Websites are built with three main technologies: HTML, CSS, and JavaScript. In the **Elements** tab, DevTools shows the HTML and CSS of the current page:
33+
Apart from JavaScript, websites are built with two main technologies: HTML and CSS. In the **Elements** tab, DevTools shows the HTML and CSS of the current page:
3434

3535
![Elements tab in Chrome DevTools](./images/devtools-elements-tab.png)
3636

@@ -58,9 +58,9 @@ HTML, a markup language, describes how everything on a page is organized, how el
5858
}
5959
```
6060

61-
While HTML and CSS describe what the browser should display, [JavaScript](https://developer.mozilla.org/en-US/docs/Learn/JavaScript) is a general-purpose programming language that adds interaction to the page.
61+
While HTML and CSS describe what the browser should display, JavaScript adds interaction to the page. In DevTools, the **Console** tab allows ad-hoc experimenting with JavaScript.
6262

63-
In DevTools, the **Console** tab allows ad-hoc experimenting with JavaScript. If you don't see it, press **ESC** to toggle the Console. Running commands in the Console lets us manipulate the loaded page—we’ll try this shortly.
63+
If you don't see it, press **ESC** to toggle the Console. Running commands in the Console lets us manipulate the loaded page—we’ll try this shortly.
6464

6565
![Console in Chrome DevTools](./images/devtools-console.png)
6666

@@ -104,13 +104,13 @@ Encyclopedia
104104

105105
## Interacting with an element
106106

107-
We won't be creating Python scrapers just yet. Let's first get familiar with what we can do in the JavaScript console and how we can further interact with HTML elements on the page.
107+
We won't be creating Node.js scrapers just yet. Let's first get familiar with what we can do in the DevTools console and how we can further interact with HTML elements on the page.
108108

109109
In the **Elements** tab, with the subtitle element highlighted, let's right-click the element to open the context menu. There, we'll choose **Store as global variable**. The **Console** should appear, with a `temp1` variable ready.
110110

111111
![Global variable in Chrome DevTools Console](./images/devtools-console-variable.png)
112112

113-
The Console allows us to run JavaScript in the context of the loaded page, similar to Python's [interactive REPL](https://realpython.com/interacting-with-python/). We can use it to play around with elements.
113+
The Console allows us to run code in the context of the loaded page. We can use it to play around with elements.
114114

115115
For a start, let's access some of the subtitle's properties. One such property is `textContent`, which contains the text inside the HTML element. The last line in the Console is where your cursor is. We'll type the following and hit **Enter**:
116116

0 commit comments

Comments
 (0)