Coroutine issue with Requests-HTML (Python)

Viewed 91

I'm trying to make some webscraping stuff on dynamic websites using requests-html (python 3.6.1), but I'm constantly getting the same error and I don't know how to solve it...

CODE:

from requests_html import HTMLSession


session = HTMLSession()

url = 'https://www.youtube.com/channel/UCTI0SHq-aexm_0ElgrmSI_A/videos'

r = session.get(url)
r.html.render(sleep=2, keep_page=True, scrolldown=1)
videos = r.html.find('#video-title')

for i in videos:
    video = {
        'title' : i.text,
        'link' : i.absolute_links
    }
    print(video)

ERROR:

RuntimeWarning: coroutine 'Browser._targetCreated' was never awaited
  f(*args, **kwargs)
RuntimeWarning: coroutine 'Browser._targetInfoChanged' was never awaited
  f(*args, **kwargs)

If someone can help me to solve this... Thanks in advance.

0 Answers
Related