We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69f574a commit 5e5f1c6Copy full SHA for 5e5f1c6
Python_5_scrape_yahoo_stock.py
@@ -0,0 +1,16 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+Created on Fri Dec 4 19:30:37 2020
4
+
5
+@author: Tin
6
7
+import pandas as pd
8
+import requests
9
+from bs4 import BeautifulSoup
10
11
+res = requests.get('https://finance.yahoo.com/quote/AMD/key-statistics?p=AMD')
12
+soup = BeautifulSoup(res.content,'lxml')
13
+table = soup.find_all('table')[0]
14
+df = pd.read_html(str(table))[0]
15
16
+print(df)
0 commit comments