OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Can't find video tag

  • Thread starter Thread starter mascai
  • Start date Start date
M

mascai

Guest
I am trying to fetch tag content from the HTML code

How can I fetch html tag's content?

My code:

Code:
import seleniumwire.undetected_chromedriver as uc
import time

options = uc.ChromeOptions()
options.add_argument('--ignore-ssl-errors=yes')
options.add_argument('--ignore-certificate-errors')

driver = uc.Chrome(options=options)

def interceptor(request):
    del request.headers['Referer'] 
    request.headers['Referer'] = 'https://yandex.ru/'

url = "https://tv6.lordserial2.cc/12045-univer-13-let-spustja46a.html"

driver.request_interceptor = interceptor
driver.get(url)

time.sleep(3)
video_tag_elements = driver.find_elements("xpath", "//video")
print(f"FOUND VIDEO TAGS: {len(video_tag_elements)}") # 0 but there are several video players

The code prints 0 (I was trying to sleep, to scroll page but it didn't help)

Proof that there are several video players enter image description here

The site is triky. You can open it from this page (the first result of the search engine https://yandex.ru/search/?text=http...a.html&search_source=dzen_desktop_safe&lr=213 )
<p>I am trying to fetch tag content from the HTML code</p>
<p><strong>How can I fetch html tag's content?</strong></p>
<p>My code:</p>
<pre><code>import seleniumwire.undetected_chromedriver as uc
import time

options = uc.ChromeOptions()
options.add_argument('--ignore-ssl-errors=yes')
options.add_argument('--ignore-certificate-errors')

driver = uc.Chrome(options=options)

def interceptor(request):
del request.headers['Referer']
request.headers['Referer'] = 'https://yandex.ru/'

url = "https://tv6.lordserial2.cc/12045-univer-13-let-spustja46a.html"

driver.request_interceptor = interceptor
driver.get(url)

time.sleep(3)
video_tag_elements = driver.find_elements("xpath", "//video")
print(f"FOUND VIDEO TAGS: {len(video_tag_elements)}") # 0 but there are several video players

</code></pre>
<p>The code prints 0 (I was trying to sleep, to scroll page but it didn't help)</p>
<p>Proof that there are several video players
<a href="https://i.sstatic.net/v8P8ZJKo.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/v8P8ZJKo.jpg" alt="enter image description here" /></a></p>
<p>The site is triky. You can open it from this page (the first result of the search engine <a href="https://yandex.ru/search/?text=http...a.html&search_source=dzen_desktop_safe&lr=213" rel="nofollow noreferrer">https://yandex.ru/search/?text=http...a.html&search_source=dzen_desktop_safe&lr=213</a> )</p>
 

Latest posts

D
Replies
0
Views
1
Dhanushka Amarakoon
D
S
Replies
0
Views
1
Shikhar Ambashta
S
Top