I am developing a scraper for someone living in USA from Pakistan, it captures facebook event data (title, time, data, days and details) using selenium chromedriver. I used driver.find_element_by_xpath() to get the data. But the data it fetches is in a different format when tried it in USA.
I used driver.find_element_by_xpath("//div[@class='_2ycp _5xhk']") method to fetch the date and time of the event and then storing it in a string python. Then i used split() method to split the strings so i can parse date, month, year and time. I tried debugging and found that it gets data in different formats for both counties Pakistan and USA. Why am i having this problem?
driver.get("Some URL i used")
date_time = driver.find_element_by_xpath("//div[@class='_2ycp _5xhk']").text
event_date_time = date_time.split()
The output picture links are attached:
In Pakistan:
In USA: