I'm trying to scraping from this website, but the problem is that the times in the selenium chrome webpage are not syncronized with my timezone. I googled and I found some related post here but those solution does not work in my case, probably I'm doing something wrong, I attach part of my attempt.
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument('--disable-translate')
chrome_options.add_argument("--lang=en")
class FxBook(NewsProvider):
def get_weakly_news(self) -> Set[News]:
driver = webdriver.Chrome(ChromeDriverManager().install(),chrome_options=chrome_options)
driver.get("https://www.myfxbook.com/forex-economic-calendar")
soup = BeautifulSoup(driver.page_source, 'html.parser')
allId = soup.find_all("tr",attrs={"data-row-id" : True})
for item in allId[:2]: # 2 just to do some test
date = item.find("div", class_="align-center calendarDateTd").text
I tried this or this and some other things but I get always the wrong timezone.