简体   繁体   中英

how to extract openload link from a website using selenium in python

I have been trying to extract the src which is a openload link from a website. The src is loacted in iframe which is loaded dynamically. the website is " https://www1.fmovies.se/film/daddys-home-2.kk29w ". Now The problem is that iframe is loaded dynamically. So this is my code

from selenium import webdriver
driver=webdriver.Chrome('C:\\Users\\aman krishna\Desktop\\New folder(3)\chromedriver.exe')
driver.get("https://bmovies.to/film/daddys-home-2.kk29w/78vp5j")
driver.find_element_by_xpath("//iframe[contains(@src,'<https://openload.co/embed/qe3n5GZGyGo/?autostart=true')]")

I could spoon feed you the code, as I wrote my own scraper with python that is eerily similar to what you've posted. but that wouldn't help you in the long run.

I'll give you a hint though. Use var box and var frames to get what you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM