I want to set a date range on the web page:
https://www.investing.com/crypto/bitcoin/btc-usd-historical-data?cid=49799
Greatful for any help!
I tried using data payload using 'picker' value but it didnt work
ticker = [x.strip() for x in
open("F:\\System\\PVWAVE\\Crypto\\tickers.txt", "r").readlines()]
urlheader = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}
payload = {'picker' : ' 06/01/2016 - 12/22/2018'}
url = "https://www.investing.com/crypto/"+ticker+"-historical-data?cid=997651"
req = requests.get(url, headers=urlheader, data=payload)
Date range needs to be set to 1st June 2016 to yesterday (every time I run it)