My df needs to have raw text, but the result i am getting comes inside brackets.
Here is my code:
chatroom = driver.find_element_by_class_name('_1_q7u')
pos= 0
df = pd.DataFrame(columns=['Msgs','Time'], index=None)
chat = driver.find_element_by_class_name('_19vo_').text
for ol in chatroom.find_elements_by_class_name('message-in'):
msgs = [k.text for k in ol.find_elements_by_class_name('_12pGw')]
times = [k.text for k in ol.find_elements_by_class_name('_1RNhZ')]
# df = [msgs,times]
df.loc[pos] = [msgs, times]
pos+=1
print(df)
Here is the output i have:
Msgs Time
0 [T] [14:30]
1 [Z] [14:36]
2 [Q] [14:37]
3 [R] [14:39]
Here is the output i want:
Msgs Time
0 T 14:30
1 Z 14:36
2 Q 14:37
3 R 14:39