Skip to content

Commit 00d4d01

Browse files
📂
1 parent 559b035 commit 00d4d01

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
import requests, os
3+
from bs4 import BeautifulSoup as bs
4+
5+
# import pandas as pd
6+
# all_tables = pd.read_html(link)
7+
8+
try: os.mkdir('Scrapped')
9+
except: pass
10+
11+
link = 'https://www.scrapethissite.com/pages/forms/?page_num=1&per_page=25'
12+
req = requests.get(link)
13+
soup = bs(req.content, 'html5lib')
14+
15+
table = soup.findAll('table', attrs = {'class':'table'})[0]
16+
for i in table:
17+
tr = table.findAll('tr')
18+
print(tr)

0 commit comments

Comments
 (0)