Skip to content

Commit e0b6f33

Browse files
author
xirenbing
committed
fix
1 parent b65bb7c commit e0b6f33

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source_code/singlecourse.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def _get_road(self, text, num):
144144
# video_lt = soup.find_all('iframe')#视频不一定全部有效
145145
video_lt = soup.find_all(class_='ans-job-icon')
146146
road_lt = []
147+
if len(video_lt)<num:
148+
num=len(video_lt)
147149
for i in range(0, num):
148150
road = ''
149151
for parent in video_lt[i].parents:

0 commit comments

Comments
 (0)