Skip to content

Commit 91fea5e

Browse files
committed
modify moment
1 parent f143d6f commit 91fea5e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

wechat_moment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def find_xiaoshuaib(self):
5353
# 获取到搜索按钮后点击
5454
search_btn = self.wait.until(EC.element_to_be_clickable((By.ID, "com.tencent.mm:id/iq")))
5555
# 等搜索建立索引再点击
56-
time.sleep(20)
56+
time.sleep(10)
5757
search_btn.click()
5858
# 获取搜索框并输入
5959
search_input = self.wait.until(EC.presence_of_element_located((By.ID, "com.tencent.mm:id/kh")))
@@ -75,11 +75,11 @@ def find_xiaoshuaib(self):
7575

7676
def get_data(self):
7777
while True:
78-
# 获取 FrameLayout
78+
# 获取 ListView
7979
items = self.wait.until(EC.presence_of_all_elements_located((By.ID, 'com.tencent.mm:id/eew')))
8080
# 滑动
8181
self.driver.swipe(self.start_x, self.start_y, self.end_x, self.end_y, 2000)
82-
#遍历获取
82+
#遍历获取每个List数据
8383
for item in items:
8484
moment_text = item.find_element_by_id('com.tencent.mm:id/kt').text
8585
day_text = item.find_element_by_id('com.tencent.mm:id/eke').text

0 commit comments

Comments
 (0)