File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -326,20 +326,20 @@ def extract_favicon_from_html(html, url):
326326# # # # # # # #
327327
328328def extract_title_from_html (html , item_id ):
329- signal .alarm (60 )
330- try :
331- soup = BeautifulSoup (html , 'html.parser' )
332- title = soup .title
329+ # signal.alarm(60)
330+ # try:
331+ soup = BeautifulSoup (html , 'html.parser' )
332+ title = soup .title
333+ if title :
334+ title = title .string
333335 if title :
334- title = title .string
335- if title :
336- return str (title )
337- except TimeoutException :
338- signal .alarm (0 )
339- logger_crawler .warning (f'BeautifulSoup HTML parser timeout: { item_id } ' )
340- else :
341- signal .alarm (0 )
342- signal .alarm (0 )
336+ return str (title )
337+ # except TimeoutException:
338+ # signal.alarm(0)
339+ # logger_crawler.warning(f'BeautifulSoup HTML parser timeout: {item_id}')
340+ # else:
341+ # signal.alarm(0)
342+ # signal.alarm(0)
343343 return ''
344344
345345def extract_description_from_html (html ):
You can’t perform that action at this time.
0 commit comments