I need to extract data from div, but i have some problems here is my code:
import urllib.request as urllib2
from bs4 import BeautifulSoup
import requests
url = 'https://ru.investing.com/crypto/bitcoin/btc-usd-technical'
headers={'User-Agent': 'Mozilla/5.0'}
req = requests.get(url=url, headers=headers)
soup = BeautifulSoup(urllib2.urlopen("https://ru.investing.com/crypto/bitcoin/btc-usd-technical"), 'html', req)
result = soup.find_all("div", {"class":"summary"})
print(result)
This is the error i got:
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden