N
N
nikegk2016-02-25 22:49:18
Python
nikegk, 2016-02-25 22:49:18

How to monitor a table online using python?

Please advise how to implement the following.
There is a table on a web resource with addresses and status. It is necessary to follow this table, if the status changes, then return the corresponding address to the variable. So far, it has been possible to parse this table, but I don’t quite understand how to further implement such a scheme.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Kislenko, 2016-02-26
@webwork

If the database is postgress you can try LISTEN\LISTEN (an example is here ).
A good option is to hang a trigger on your table ( example ), for example, on an event, update or insert, write changes to tables, for example, log, and monitor this table with a Python script, for example, periodically request the number of records, if the number of records has changed, select the last necessary records.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question