-3

How can I wait with requests 4 seconds (because the web page loads a part only after 2 seconds)?

With Python3 and requests (beautifulsoup4)

Lukas
  • 1
  • Does this answer your question? [How do I get my Python program to sleep for 50 milliseconds?](https://stackoverflow.com/questions/377454/how-do-i-get-my-python-program-to-sleep-for-50-milliseconds) – Ajay Dabas Jan 21 '20 at 08:58

2 Answers2

0

I'm assuming you want to pause your program for 4 seconds after sending a request. If that's the case, then time.sleep will do the job for you.

import time

time.sleep(4)

Lapis Rose
  • 644
  • 3
  • 15
0

You could try adding the time.sleep function everything you want to wait a few seconds

import time

time.sleep(4) #Time in seconds
coolio85
  • 171
  • 1
  • 13