I wrote a simple python script just to view the page source of a website.The website is https://kissanime.to
. I am using the following small piece of code.
import urllib2
url = 'https://kissanime.to'
link = urllib2.urlopen(url)
print link
However the above process is not working and is showing the error message as follows
HTTP Error 403 : Forbidden
i tried a finding a solution to the above problem in the community and came up with this :-
import urllib2
url = 'https://kissanime.to'
link1 = urllib2.Request(url,headers = {'User-Agent' : "Magic Browser"})
link2 = urllib2.urlopen(link1)
However the above method also fails and now i am getting the error:-
HTTP Error 503 : Service Temporarily Unavailable
Is there any kind of workaround to this problem? I am all new to this web-crawling features of python. please help.