0

I'm trying to get into papara.com using Python. When I make a request it always gives 403 as a response. I got cookies from my browser. Here is my code:

import requests

headers = {
    'authority': 'www.papara.com',
    'upgrade-insecure-requests': '1',
    'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36',
    'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
    'sec-fetch-site': 'none',
    'sec-fetch-mode': 'navigate',
    'sec-fetch-user': '?1',
    'sec-fetch-dest': 'document',
    'accept-language': 'en-US,en;q=0.9',
    'cookie': '__cfruid=64370d0d06d80a1e1a701ae8bee5a4b85c1de1af-1610296629',
}

response = requests.get('https://www.papara.com/', headers=headers)

I tried different user agents, I tried removing the cookie from the headers but didn't work.

Mein O
  • 1
  • the page requires javascript, [use selenium](https://stackoverflow.com/questions/8049520/web-scraping-javascript-page-with-python) – user70 Jan 10 '21 at 17:39
  • which data do you want to extract? There is an api to extract the data, easy to extract.https://webapi.papara.com/fx/prices – Samsul Islam Jan 12 '21 at 05:26

0 Answers0