Written a small script that periodically parses the web-page. "Demonized" is the script using this class: Source
The script itself works correctly, but it sometimes "falls". And can work consistently for two months and "fall", and maybe a week.
Using the library logging
script writes its log. It was determined that the crash occurred after this code:
except Exception as error:
logging.error("Error while getting updated pages: %s", error)
logging.info("Output list: %s", g.doc.select('//pre').text())
I thought that the problem with getting the updated pages, but it is correct. According to the log it is visible that triggered the block else
. After the script stops. After this block is another entry in the log, but it is not recorded.
Running it all on CentOS 6.7 (Final)
. The script is written in python3
, python version 3.4.3
, a library is used Grab
Tell me how to track which "crashes" the script? Maybe the Python is a common log or in the system somewhere it can be tracked?