url = 'https://example.com/music/' response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') for link in soup.find_all('a'): href = link.get('href') if href and not href.startswith('?'): print(href)

You might wonder: Why would anyone intentionally leave their files exposed like this?

Disable "Directory Browsing" in the feature list.

If you want to create a public or private link that lists files in a web folder, use these methods: Default Apache/Nginx Behavior: