hi, i have a code on here and i upgraded the account already and i'm getting the Error 403: Forbidden.
here is the part of the code
Am I doing something wrong?
def get_price_parts(url):
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36',
'Authorization': 'Token {}'.format(token)
}
try:
# Fetch the content of the URL with a custom User-Agent
response = requests.get(url, headers=headers)
response.raise_for_status() # Raise an error for bad responses
# Parse the HTML content with BeautifulSoup
soup = BeautifulSoup(response.text, 'html.parser')