How to use multithreading on a list of sites?

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Hey, i have a list of 150 sites where i want to create accounts.

The macro takes the first line from a txt file and creates an account on that site.

The line will be deleted if account creation was successful. For that i created a validation (text presence check).

If i start 5 threads, the template will process the same site 5 times cause it is in the first line. But i want that the template creates an account for the first 5 sites, then for the next 5 sites etc.

I can't delete the line in the beginning cause i want to know if the account creation on that particular site was successful or not. (text presence check is only possible after account creation)

What's the best way to use multithreading with several sites AND get an overview about the success?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
I pull the line from the list and delete it first. Then I run my check for successful creation or url or any other check. If it fails, I save the url to an unsuccessful file. Then I can go back and see if there is a problem with the site, or my proxy or my template. That way you always have your urls. And I guess you know this but you need to keep backups of your files.

I have this problem on my forum registration templates. I use a list of proxies. Sometimes the page will come up, sometimes it doesn't. I'll run it through a loop 5 times and pull up different proxies to see if the page will load. If it doesn't after 5 tries, I save the url to try when I run another proxy scrape.
 
  • Спасибо
Реакции: zeus и player

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Thx for that, but how can i get the url a second time if it was deleted from the file (Because i want to append the unsuccessful url to a file named "unsuccessful.txt")?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
The result of your step branch where you pulled the line from the file.
 

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
Thank you very much! It works now :-)
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)