I am trying to get a movie trailer url from YouTube using parsing with lxml.html:
from lxml import html
import lxml.html
from lxml.etree import XPath
def ge
SSL/TLS is not supported by libxml2. Use Python's urllib2 instead.
If you try any url with http://<blah>.<blah>
you wont have trouble but https is not supported here. There are redirection issues also.
Try
from urllib2 import urlopen
import lxml.html
tree = lxml.html.parse(urlopen('https://google.com'))
For more information refer this
Solution
Well there are workaround. Try selenium and if you dont want a UI then run selenium in headless mode. Works fine i tried it myself.