Skip to content

Commit

Permalink
log advfn error
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermecgs committed Aug 4, 2024
1 parent 34f6b47 commit de8d71c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/crawler_advfn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import logging
from bs4 import BeautifulSoup

import pandas as pd
Expand All @@ -11,6 +12,7 @@

from src.utils import CACHE_DIR

logging.basicConfig(level=logging.ERROR, format='%(asctime)s %(levelname)s:%(message)s')

this = sys.modules[__name__]

Expand All @@ -26,7 +28,8 @@ def busca_parametros(ticker):
this.advfn = CrawlerAdvfn()
return this.advfn.recupera_informacoes(ticker)

except Exception:
except Exception as ex:
logging.error("Error in busca_parametros: %s", ex, exc_info=True)
return None


Expand Down

0 comments on commit de8d71c

Please sign in to comment.