Is there a way to import hidden data into a data frame format?

Asked 2 years ago, Updated 2 years ago, 51 views

Hello, I'm a beginner at Python.

I'm trying to get the data from the web page

Of all things, the necessary data is in the form of a hidden account.

First, I'll upload the code.

from urlib.request import urlopen
import pandas as pd
import requests
from bs4 import BeautifulSoup
from datetime import datetime

fs_rpt_url = "http://comp.fnguide.com/SVO2/ASP/SVD_Finance.asp?pGB=1&gicode=A005930&cID=&MenuYn=Y&ReportGB=&NewMenuID=103&stkGb=701"
fs_rpt_res = requests.get(fs_rpt_url)
fs_rpt_df = pd.read_html(fs_rpt_res.text)
print(fs_rpt_df)

Running the above code will result in data in a data frame format.

From there, in the fourth row,

'Open accounts that participated in the calculation of sales and management costs'

There's a part that comes out like this.

If you actually go to the web page and look for it, there is a + button next to itSeo

You have to press it to get more details.

I need that data.

I asked the same question the other day, and there was a person who posted how to extract data.

I even made a ticket by searching on the Internet based on that, but it's too much trouble.

Is there a way to pick a data frame, a list format, or anything right away?

I'd appreciate it if you could answer me.

python dataframe

2022-09-20 18:05

1 Answers

In that case, you should dynamically import data using selenium and webdriver instead of beautiful soup.


2022-09-20 18:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.