gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
how to get all .png files from a html page stored as a string in Python using re?
- User
how to get all .png files from a html page stored as a string in Python using re?
- Assistant
To extract all
.pngfile URLs from an HTML page stored as a string using Python'sremodule, you can use a regular expression to search for image tags and then filter out the URLs that end with.png. Here's a simple example:python