Skip to content

Commit 478fe6b

Browse files
committed
init
0 parents  commit 478fe6b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

app.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from trywebscraping import Fetch
2+
3+
hn = Fetch("https://news.ycombinator.com")
4+
articles = hn.query("tr.athing").extract({
5+
"rank": "span.rank",
6+
"title": "td.title a",
7+
"link": "td.title a@href"
8+
}).limit(10)
9+
print(articles)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
trywebscraping @ file:///Users/luke/try-web-scraping-lib

0 commit comments

Comments
 (0)