K
K
kolomiec_artiom2018-03-12 01:55:47
Python
kolomiec_artiom, 2018-03-12 01:55:47

How to create a condition in Python "Until something appears on the site - stay on it"?

Good night friends!
I need to create a program that will act according to the following plan:

  1. Go to some website
  2. Stay until the desired entry appears on it

How to implement the transition to the site I know (webbrowser) , how to parse I know (lxml) . One question remains: how to write the condition "Stay on the site until"?
Thanks for the replies!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Bay, 2018-03-12
@kolomiec_artiom

You need a virtual browser like phantomjs. Not sure which is better now.
Write one promise function to wait for text, then exit.

S
Saboteur, 2018-03-12
@saboteur_kiev

Understand how http works and understand that there is no such thing as "staying on the site" in principle.
You need to periodically visit the site and get the latest information.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question