2021年4月10日星期六

How can I add "http" to the "src" attributes?

I am trying to scrape content from some websites, this is the websites HTML:

<div class="answer-given-body ugc-base">    <p><img alt="" src="//d2vlcm61l7u1fs.cloudfront.net/media%2F61d%2F61d6042d-e4dd-41d9-9a5c-0ceb481ddbc9%2FphpKFGb9B.png"/><img alt="" src="//d2vlcm61l7u1fs.cloudfront.net/media%2Fd72%2Fd72dfa6c-8e50-475a-86cf-678a04ae4606%2FphpQZYPYo.png"/><img alt="" src="//d2vlcm61l7u1fs.cloudfront.net/media%2F4c7%2F4c775a01-8590-4b93-bc20-03d282586f95%2FphpE7XFWI.png"/></p>    </div>`  

In the above HTML inside the img tag in the src attribute, it does not start with "HTTP" so the images are not showing when I save the HTML file, how can I edit the src attributes and add "HTTP" before them?

https://stackoverflow.com/questions/67041108/how-can-i-add-http-to-the-src-attributes April 11, 2021 at 11:10AM

没有评论:

发表评论