I don't understand why I am getting a 403 error for some of these sites.
If I visit the URLs manually the pages load fine. There isn't any error message other that the 403 response, so I don't know how to diagnose the problem.
from bs4 import BeautifulSoup
import requests
test_sites = [
'http://fashiontoast.com/',
'http://becauseimaddicted.net/',
'http://www.lefashion.com/',
'http://www.seaofshoes.com/',
]
for site in test_sites:
print(site)
#get page soure
response = requests.get(site)
print(response)
#print(response.text)
Result of running the above code is...
http://fashiontoast.com/
Response [403]
http://becauseimaddicted.net/
Response [403]
http://www.lefashion.com/
Response [200]
http://www.seaofshoes.com/
Response [200]
Can anyone help me understand the cause of the problem and the solution please?
