find all js/css/image pathnames in a HTML document

Chris Angelico rosuav at gmail.com
Sat May 11 04:27:53 EDT 2019


On Sat, May 11, 2019 at 6:21 PM iMath <redstone-cold at 163.com> wrote:
>
> To find all js/css/image pathnames in a HTML document, I used regular expression(in the last line of my code snippet) to do this as the following, are there any other shorter regular expressions or more efficient ways to do this ?
>

https://stackoverflow.com/a/1732454/1236787
https://www.crummy.com/software/BeautifulSoup/bs4/doc/

Much more efficient and reliable.

ChrisA



More information about the Python-list mailing list