mardi 18 mai 2021

How to add numbers in link (loop)

I'm writing a script where I try to scrape data from json files. The website link structure looks like this:

https://go.lime-go.com/395012/Organization/pase1009/

I want the Python script to go through a certain number and try to visit them. For example, right now the link is at pase1009. After the script has visited this link I want it to go to pase1010 and so on.

I'm really new to Python and trying to learn how to use loops, count, etc. but don't get it.

My PY code:

    rlista = "https://go.lime-go.com/395012/Organization/pase1009/getEmployees"
    page = self.driver.get(rlista)
    time.sleep(2)

Best regards, Tobias




Aucun commentaire:

Enregistrer un commentaire