Skip to content

Commit b20f3df

Browse files
committed
- Page Explorer Bug Fix
1 parent 2305d96 commit b20f3df

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

module/article_parser.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,12 @@ def page_explorer(self, keyword, s_type, search_pos=''):
130130
else:
131131
page['end'] = page_box[-2].text.strip()
132132

133-
if '이전' in page['end']:
134-
page['end'] = 1
135-
else:
136-
page['end'] = int(page['end'])
133+
#문자열일 경우
134+
if isinstance(page['end'], str):
135+
if '이전' in page['end']:
136+
page['end'] = 1
137+
else:
138+
page['end'] = int(page['end'])
137139

138140
# next_pos 구하기 (다음 페이지 검색 위치)
139141
next_pos = soup.select('a.search_next')

0 commit comments

Comments
 (0)