Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scraping video src fail
#1
HI I have a question related to HTML readers. I try to use selenium to scrap the video, but it seems not working. I just want to grab the src link. i use the chrome development tool and is able to find it, but when I used XPath in selenium will pop an error.
i saw it related to https://stackoverflow.com/questions/3129...ideo-links.

When i used driver.find_element_by_xpath , it occur error
below is HTML
<html>
 <head>
  <body>
     <div>
        <html>
          <head>
              <body>
                <div id="container" >
                    <div tableindex= -1>
                        <video id="my_video_1_html5_api" class="vjs-tech" controlslist="nodownload" preload="auto" poster="https://vs02.520call.me/files/mp4/f/ttttt.jpg" <source src="https://vs02.520call.me/files/mp4/f/fwnOT.m3u8?t=1234444”  type="application/vnd.apple.mpegurl"></video>
i try with this three way unable to grab the src link, but none of them is able to geable the src
driver.find_element_by_xpath(‘//*[@id=“my_video_1_html5_api”]’)
driver.find_element_by_xpath('//*[@class="vjs-tech"]')
driver.find_element_by_id('lmy_video_1_html5_api')
it occur error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="lmy_video_1_html5_api"]"}
(Session info: chrome=91.0.4472.114)
Reply


Messages In This Thread
scraping video src fail - by jacklee26 - Jul-10-2021, 01:29 PM
RE: scraping video src fail - by snippsat - Jul-10-2021, 02:16 PM
RE: scraping video src fail - by jacklee26 - Jul-10-2021, 07:17 PM
RE: scraping video src fail - by snippsat - Jul-10-2021, 08:17 PM
RE: scraping video src fail - by jacklee26 - Jul-11-2021, 02:32 AM
RE: scraping video src fail - by snippsat - Jul-11-2021, 09:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why does [root.destroy, exit()]) fail after pyinstaller? Rpi Edward_ 4 670 Oct-18-2023, 11:09 PM
Last Post: Edward_
  How to calculated how many fail in each site(s) in csv files SamLiu 4 1,330 Sep-26-2022, 06:28 AM
Last Post: SamLiu
  Imports that work with Python 3.8 fail with 3.9 and 3.10 4slam 1 2,644 Mar-11-2022, 01:50 PM
Last Post: snippsat
  [SOLVED] Why does regex fail cleaning line? Winfried 5 2,509 Aug-22-2021, 06:59 PM
Last Post: Winfried
  fail to upgrade pygobject jiapei100 0 3,103 Aug-16-2018, 10:32 AM
Last Post: jiapei100
  Fail to allocate bitmap rsbeesh 7 15,803 Dec-13-2017, 01:36 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020