We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9629aef commit 6d246fbCopy full SHA for 6d246fb
webscraper.py
@@ -0,0 +1,16 @@
1
+import requests
2
+from bs4 import BeautifulSoup
3
+# Make a request
4
+page = requests.get("Paste a Domain here")
5
+soup = BeautifulSoup(page.content, 'html.parser')
6
+
7
+# Create all_h1_tags as empty list
8
+all_h1_tags = []
9
10
+# Set all_h1_tags to all h1 tags of the soup
11
+for element in soup.select('h1'):
12
+ all_h1_tags.append(element.text)
13
14
+print(all_h1_tags)
15
16
+# give you all h1 tags
0 commit comments