Skip to content

Commit c55010a

Browse files
honzajavorekmnmkng
andauthored
style: use regular numbering
See #1303 (comment) Co-authored-by: Ondra Urban <[email protected]>
1 parent ecc715b commit c55010a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sources/academy/webscraping/scraping_basics_python/12_framework.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ if __name__ == '__main__':
6666
In the code, we do the following:
6767

6868
1. We perform imports and specify an asynchronous `main()` function.
69-
1. Inside, we first create a crawler. The crawler objects control the scraping. This particular crawler is of the BeautifulSoup flavor.
70-
1. In the middle, we give the crawler a nested asynchronous function `handle_listing()`. Using a Python decorator (that line starting with `@`), we tell it to treat it as a default handler. Handlers take care of processing HTTP responses. This one finds the title of the page in `soup` and prints its text without whitespace.
71-
1. The function ends with running the crawler with the product listing URL. We await the crawler to finish its work.
72-
1. The last two lines ensure that if we run the file as a standalone program, Python's asynchronous machinery will run our `main()` function.
69+
2. Inside, we first create a crawler. The crawler objects control the scraping. This particular crawler is of the BeautifulSoup flavor.
70+
3. In the middle, we give the crawler a nested asynchronous function `handle_listing()`. Using a Python decorator (that line starting with `@`), we tell it to treat it as a default handler. Handlers take care of processing HTTP responses. This one finds the title of the page in `soup` and prints its text without whitespace.
71+
4. The function ends with running the crawler with the product listing URL. We await the crawler to finish its work.
72+
5. The last two lines ensure that if we run the file as a standalone program, Python's asynchronous machinery will run our `main()` function.
7373

7474
Don't worry if this involves a lot of things you've never seen before. For now, you don't need to know exactly how [`asyncio`](https://docs.python.org/3/library/asyncio.html) works or what decorators do. Let's stick to the practical side and see what the program does when executed:
7575

0 commit comments

Comments
 (0)