-1

Python27 on windows (32bit)

Hi Experts,

I was referring to this website

I was trying to do the same thing but having this error and stuck.

import win32com.client
import os
import win32com.gen_py.MSO as MSO # contains constants refering to Microsoft Office Objects
import win32com.gen_py.MSPPT as MSPPT # contains constants refering to Microsoft Office Power Point Objects
from lxml.html import parse

tree = parse('http://www.imdb.com/chart/top')
movies = tree.findall('.//table[@class="chart full-width"]//td[@class="titleColumn"]//a')
movies[0].text_content()
  • IOError: Error reading file 'http://www.imdb.com/chart/top': failed to load external entity "http://www.imdb.com/chart/top"

Can anyone help here?

Hachi
  • 179
  • 14

1 Answers1

0

http://www.imdb.com/chart/top is redirecting to https://www.imdb.com/chart/top, Secured connetion is not supported by lxml.

Check this answer

Ora Aff
  • 640
  • 1
  • 9
  • 24