Skip to content

Commit

Permalink
repeat_request & html error
Browse files Browse the repository at this point in the history
  • Loading branch information
minyoung347 committed Jul 3, 2019
1 parent c918851 commit 272185a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion korea_news_crawler/articlecrawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ def crawling(self, category_name):

# 기사 HTML 가져옴
request_content = self.get_url_data(content_url)
document_content = BeautifulSoup(request_content.content, 'html.parser')
try:
document_content = BeautifulSoup(request_content.content, 'html.parser')
except:
continue

try:
# 기사 제목 가져옴
Expand Down

0 comments on commit 272185a

Please sign in to comment.