how to parse an HTML/PHP web-page to get the content of the table using python
Question:
I need get the content of the table from http://www.o1vsk.lv/index.php/stundu-izmainas page and create a table which is for 6.d class to look like a table.
I have tried.
import requests
import pandas
res = requests.post('http://www.o1vsk.lv/index.php/stundu-izmainas', data={'page': '1'})
html = pandas.read_html(res.content)
print(res)
print(html)
Answers:
To scrap through an HTML, I recommend using the BeatifulSoup library ans search for a <table>
tag
I need get the content of the table from http://www.o1vsk.lv/index.php/stundu-izmainas page and create a table which is for 6.d class to look like a table.
I have tried.
import requests
import pandas
res = requests.post('http://www.o1vsk.lv/index.php/stundu-izmainas', data={'page': '1'})
html = pandas.read_html(res.content)
print(res)
print(html)
To scrap through an HTML, I recommend using the BeatifulSoup library ans search for a <table>
tag