Skip to content

Commit 307ad77

Browse files
committed
final sync version.
1 parent d9a5de4 commit 307ad77

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

apps/net/Ch5_nuget/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void GetTitleRange()
3434
Console.ForegroundColor = ConsoleColor.White;
3535
}
3636

37-
public static string GetEpisodeHtml(int episodeNumber, string url = null)
37+
public static string GetEpisodeHtml(int episodeNumber, string url = null)
3838
{
3939
if (string.IsNullOrEmpty(url))
4040
{

apps/py/ch10_async/ascrape.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
from colorama import Fore
22
import httpx
33
import bs4
4+
import datetime
45

56

67
def main():
7-
print("Using Python packages")
8+
print("Python async web scraper")
89

10+
t0 = datetime.datetime.now()
911
get_titles()
12+
dt = datetime.datetime.now() - t0
13+
print(f"Finished in {dt.total_seconds():,.2f} seconds.")
1014

1115

1216
def get_html(n: int) -> str:
@@ -31,7 +35,7 @@ def get_title_from_html(n: int, html: str) -> str:
3135

3236

3337
def get_titles():
34-
for n in range(220, 230):
38+
for n in range(220, 231):
3539
html = get_html(n)
3640
title = get_title_from_html(n, html)
3741
print(Fore.GREEN + title)

0 commit comments

Comments
 (0)