Not able to scrape embedded YouTube video from website - python

I am trying to scrape this(marked in red in attached image) embedded YouTube video from " https://www.akrapovic.com/en/car/product/86/Ferrari/458-Italia-458-Spider/Slip-On-Line-Titanium?brandId=20&modelId=70&yearId=3945" but am not able to find its source or any YouTube link to scrape.
Code I've written to get is as follows. Unfortunately, all it does is throws an 'NoSuchElementException'.Please suggest me best way to go about with this. Thanks in advance.
driver.get(part_page_link_holder3)
video_holder = driver.find_element(By.CSS_SELECTOR, 'video-fullscreen')
driver.execute_script("arguments[0].click();", video_holder)
video_holder2 = driver.find_element(By.XPATH,'//iframe')
print(video_holder2)

It is visible in the code after looking through inspect. It only shows up after clicking the play button on the video though.

Related

Not able to click on Google recaptcha checkbox (Python, Selenium)

I have a python code that works for me, unfortunately it does not work on wix.com login page. (to see that page, open wix.com, click Sign In button, and then click Log in link to open the page)
The problem is with clicking on recaptcha box.
This is a part of the relevant page html
Here's the part of the code that I am using for testing:
frames = driver.find_element(By.XPATH, "//iframe[#title='reCAPTCHA']") driver.switch_to.frame(frames) try: a = driver.find_element(By.CLASS_NAME, "recaptcha-checkbox-border") a.click()
Program goes in to the try area and then throws an error when trying to find the element.
I would appreciate if someone could help me find the reason why?
My guess it is something related to the page I am accessing as the same code works well on a different site.

Mp4 download using python requests

So I've been working on a webscraping script to download a video from a specific website I'm done scraping the site and have the video source.
The video has a play botton I've tried using selenium on it it plays but I don't know how to perform the download using selenium. Also I tried this other codes
wget.download('http://wwwstatic.chia-anime.tv/player.php?id=96576')
I also tried using the request library iter tools
But that only downloads 14.4kb
Also I observed the direct link (above link) that plays the video has a click botton and when it's clicked it sends a network request to another site but I don't know how to replicate it
Please help
You want to wget the actual file, not the php page.
I got the video link from the page so this should work.
wget.download('https://animesource.me:7995/cache/TDJgNsh-ZXf5Qd81-24vVg/1584877220/j1vznzzjn5ns.html.mp4')

Python Selenium -- Searching for a link but finding cards

Using Python + Selenium to create a web crawler/scraper to notify me when new homework is posted. Managed to log into the main website, but you need to click a link to select your course.
After searching through the HTML manually, I found this information about the link I usually click (The blue box is the link).
However, no button that seems clickable. So I searched the page for the link I knew it should redirect me to, and I found this:
It looks like a card, which is a new data structure/object for me. How can I use an automated web crawler to click this link?
Try the following:
ui.WebDriverWait(self.driver, timeout).until(EC.visibility_of_element_located((By.CSS_SELECTOR, ".title.ellipsis")))
driver.find_element_by_css_selector(".title.ellipsis").click()
Hope it helps you!

How to extract request url using python selenium

I am new to webscraping and need some help to extract a request-url from the online movie-stream website YIFY. I am familiar with how selenium works and I am trying to find the download url of the movie Revenant.
Using python-selenium I can click on the play icon and if you open your inspect element and go the network tab then you can see the request-url but you can't do inspect element and find it.
Download link - http://download1282.mediafire.com/3pvv1jx9z23g/crdad7bg0ghjh7r/vid.pdf
I am trying to extract this particular download link using python-selenium. Could anyone tell me if it is possible? Well I am not trying to download the movie but checking if it is possible to download the links from it. Here the links are not embedded in the html page, and I will highly appreciate any help.

Python: Extract video stream link from a page

I wonder if there is a way to extract a video stream link from a page.
For example in Youtube and in the page http://www.youtube.com/watch?v=he5fpsmH_2g extract the actual download link of the video and download it, just like what VideoGet does.
Thanks in advance.
Have a look in the src-code for clive to see how it can be done from a script.

Categories