text_html_output_2.png
from bs4 import BeautifulSoup

import pandas as pd

import requests

url = 'https://info.ctfx.jp/service/market/data_download.html'
res = requests.get(url)
soup = BeautifulSoup(res.text, 'html.parser')

DIR = 'https://info.ctfx.jp/service/market/'
table0 = soup.find_all('a')
table1 = []
for item in table0:
    if item.text == '日足（CSV）':
        table1 += [DIR + item['href']]

import pandas as pd
link = pd.DataFrame(columns=['name', 'link'])
names = []
for item in table1:
    names += [item.split('/')[-1][3:9]]
link['name'] = names
link['link'] = table1
link

NAMES = names.copy()
LINK = names.copy()
print(LINK)