最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Python Selenium: How to access iframe source without src attribute? - Stack Overflow

programmeradmin4浏览0评论

There is a webpage where I would like to access the iframe source to download a file.

The problem is, there is no src attribute in the iframe or its html, it’s inside #document. How to I get the link from inside #document?

example:

<iframe title=“PDF Preview”>
    #document (url is here)
    <!DOCTYPE html>
    <html>
        <head></head>
        <body>
            <embed src=“about:blank”>
        </body>
    </html>
</iframe>

I can switch to the iframe but I can only retrieve attributes within the tags html, head etc. but I’m not able to get the link inside #document. Is there a way to retrieve/go to the url inside #document?

发布评论

评论列表(0)

  1. 暂无评论