2013-09-14, 15:51
I tried this to scrape this url
url = 'http://phim.xixam.com/m/xem-online/sieu-anh-hung-2-15629-1-1.html'
req = urllib2.Request(url)
req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
link=response.read()
response.close()
print 'link: ' + link
All i get in the xbmc log file is
<script language="javascript">
var msg = "";
if(msg!="") alert(msg);
location.href="/";
</script>
What did I do wrong? Please help.
url = 'http://phim.xixam.com/m/xem-online/sieu-anh-hung-2-15629-1-1.html'
req = urllib2.Request(url)
req.add_header('User-Agent', ' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
link=response.read()
response.close()
print 'link: ' + link
All i get in the xbmc log file is
<script language="javascript">
var msg = "";
if(msg!="") alert(msg);
location.href="/";
</script>
What did I do wrong? Please help.