Показать сообщение отдельно
  #1 (permalink)  
Старый 04.05.2023, 14:49
Новичок на форуме
Отправить личное сообщение для MichaelYT Посмотреть профиль Найти все сообщения от MichaelYT
 
Регистрация: 23.01.2021
Сообщений: 7

Помогите объединить несколько JS скриптов, получении данных
Доброго времени суток!
Имеется страничка: https://ru.warface.com/officers/
Данную страницу просматривать может только мой аккаунт (ибо я офицер клана).
Получить нужно все никнеймы игроков на этой странице, количество набранных ими очков, дата вступления.

Вот так нужные данные выглядят в инспекторе: https://ibb.co/qCpV5gp

Вот так я получаю нужные мне данные сейчас:

js1 := "document.getElementsByClassName('oc_1')[0].innerText"
js2 := "document.getElementsByClassName('oc_3')[0].innerText"
js3 := "document.getElementsByClassName('oc_5')[0].innerText"

js1 := "document.getElementsByClassName('oc_1')[1].innerText"
js2 := "document.getElementsByClassName('oc_3')[1].innerText"
js3 := "document.getElementsByClassName('oc_5')[1].innerText"

js1 := "document.getElementsByClassName('oc_1')[2].innerText"
js2 := "document.getElementsByClassName('oc_3')[2].innerText"
js3 := "document.getElementsByClassName('oc_5')[2].innerText"

js1 := "document.getElementsByClassName('oc_1')[3].innerText"
js2 := "document.getElementsByClassName('oc_3')[3].innerText"
js3 := "document.getElementsByClassName('oc_5')[3].innerText"

js1 := "document.getElementsByClassName('oc_1')[4].innerText"
js2 := "document.getElementsByClassName('oc_3')[4].innerText"
js3 := "document.getElementsByClassName('oc_5')[4].innerText"

js1 := "document.getElementsByClassName('oc_1')[5].innerText"
js2 := "document.getElementsByClassName('oc_3')[5].innerText"
js3 := "document.getElementsByClassName('oc_5')[5].innerText"

js1 := "document.getElementsByClassName('oc_1')[6].innerText"
js2 := "document.getElementsByClassName('oc_3')[6].innerText"
js3 := "document.getElementsByClassName('oc_5')[6].innerText"

js1 := "document.getElementsByClassName('oc_1')[7].innerText"
js2 := "document.getElementsByClassName('oc_3')[7].innerText"
js3 := "document.getElementsByClassName('oc_5')[7].innerText"

js1 := "document.getElementsByClassName('oc_1')[8].innerText"
js2 := "document.getElementsByClassName('oc_3')[8].innerText"
js3 := "document.getElementsByClassName('oc_5')[8].innerText"

js1 := "document.getElementsByClassName('oc_1')[9].innerText"
js2 := "document.getElementsByClassName('oc_3')[9].innerText"
js3 := "document.getElementsByClassName('oc_5')[9].innerText"

js1 := "document.getElementsByClassName('oc_1')[10].innerText"
js2 := "document.getElementsByClassName('oc_3')[10].innerText"
js3 := "document.getElementsByClassName('oc_5')[10].innerText"

js1 := "document.getElementsByClassName('oc_1')[11].innerText"
js2 := "document.getElementsByClassName('oc_3')[11].innerText"
js3 := "document.getElementsByClassName('oc_5')[11].innerText"

js1 := "document.getElementsByClassName('oc_1')[12].innerText"
js2 := "document.getElementsByClassName('oc_3')[12].innerText"
js3 := "document.getElementsByClassName('oc_5')[12].innerText"

js1 := "document.getElementsByClassName('oc_1')[12].innerText"
js2 := "document.getElementsByClassName('oc_3')[12].innerText"
js3 := "document.getElementsByClassName('oc_5')[12].innerText"

js1 := "document.getElementsByClassName('oc_1')[12].innerText"
js2 := "document.getElementsByClassName('oc_3')[12].innerText"
js3 := "document.getElementsByClassName('oc_5')[12].innerText"

js1 := "document.getElementsByClassName('oc_1')[13].innerText"
js2 := "document.getElementsByClassName('oc_3')[13].innerText"
js3 := "document.getElementsByClassName('oc_5')[13].innerText"

js1 := "document.getElementsByClassName('oc_1')[14].innerText"
js2 := "document.getElementsByClassName('oc_3')[14].innerText"
js3 := "document.getElementsByClassName('oc_5')[14].innerText"

js1 := "document.getElementsByClassName('oc_1')[15].innerText"
js2 := "document.getElementsByClassName('oc_3')[15].innerText"
js3 := "document.getElementsByClassName('oc_5')[15].innerText"

js1 := "document.getElementsByClassName('oc_1')[16].innerText"
js2 := "document.getElementsByClassName('oc_3')[16].innerText"
js3 := "document.getElementsByClassName('oc_5')[16].innerText"

js1 := "document.getElementsByClassName('oc_1')[17].innerText"
js2 := "document.getElementsByClassName('oc_3')[17].innerText"
js3 := "document.getElementsByClassName('oc_5')[17].innerText"

js1 := "document.getElementsByClassName('oc_1')[18].innerText"
js2 := "document.getElementsByClassName('oc_3')[18].innerText"
js3 := "document.getElementsByClassName('oc_5')[18].innerText"

js1 := "document.getElementsByClassName('oc_1')[19].innerText"
js2 := "document.getElementsByClassName('oc_3')[19].innerText"
js3 := "document.getElementsByClassName('oc_5')[19].innerText"

js1 := "document.getElementsByClassName('oc_1')[20].innerText"
js2 := "document.getElementsByClassName('oc_3')[20].innerText"
js3 := "document.getElementsByClassName('oc_5')[20].innerText"

js1 := "document.getElementsByClassName('oc_1')[21].innerText"
js2 := "document.getElementsByClassName('oc_3')[21].innerText"
js3 := "document.getElementsByClassName('oc_5')[21].innerText"

js1 := "document.getElementsByClassName('oc_1')[22].innerText"
js2 := "document.getElementsByClassName('oc_3')[22].innerText"
js3 := "document.getElementsByClassName('oc_5')[22].innerText"

js1 := "document.getElementsByClassName('oc_1')[23].innerText"
js2 := "document.getElementsByClassName('oc_3')[23].innerText"
js3 := "document.getElementsByClassName('oc_5')[23].innerText"

js1 := "document.getElementsByClassName('oc_1')[24].innerText"
js2 := "document.getElementsByClassName('oc_3')[24].innerText"
js3 := "document.getElementsByClassName('oc_5')[24].innerText"

js1 := "document.getElementsByClassName('oc_1')[25].innerText"
js2 := "document.getElementsByClassName('oc_3')[25].innerText"
js3 := "document.getElementsByClassName('oc_5')[25].innerText"

js1 := "document.getElementsByClassName('oc_1')[26].innerText"
js2 := "document.getElementsByClassName('oc_3')[26].innerText"
js3 := "document.getElementsByClassName('oc_5')[26].innerText"

js1 := "document.getElementsByClassName('oc_1')[27].innerText"
js2 := "document.getElementsByClassName('oc_3')[27].innerText"
js3 := "document.getElementsByClassName('oc_5')[27].innerText"

js1 := "document.getElementsByClassName('oc_1')[28].innerText"
js2 := "document.getElementsByClassName('oc_3')[28].innerText"
js3 := "document.getElementsByClassName('oc_5')[28].innerText"

js1 := "document.getElementsByClassName('oc_1')[29].innerText"
js2 := "document.getElementsByClassName('oc_3')[29].innerText"
js3 := "document.getElementsByClassName('oc_5')[29].innerText"

js1 := "document.getElementsByClassName('oc_1')[30].innerText"
js2 := "document.getElementsByClassName('oc_3')[30].innerText"
js3 := "document.getElementsByClassName('oc_5')[30].innerText"

js1 := "document.getElementsByClassName('oc_1')[31].innerText"
js2 := "document.getElementsByClassName('oc_3')[31].innerText"
js3 := "document.getElementsByClassName('oc_5')[31].innerText"

js1 := "document.getElementsByClassName('oc_1')[32].innerText"
js2 := "document.getElementsByClassName('oc_3')[32].innerText"
js3 := "document.getElementsByClassName('oc_5')[32].innerText"

js1 := "document.getElementsByClassName('oc_1')[33].innerText"
js2 := "document.getElementsByClassName('oc_3')[33].innerText"
js3 := "document.getElementsByClassName('oc_5')[33].innerText"

js1 := "document.getElementsByClassName('oc_1')[34].innerText"
js2 := "document.getElementsByClassName('oc_3')[34].innerText"
js3 := "document.getElementsByClassName('oc_5')[34].innerText"

js1 := "document.getElementsByClassName('oc_1')[35].innerText"
js2 := "document.getElementsByClassName('oc_3')[35].innerText"
js3 := "document.getElementsByClassName('oc_5')[35].innerText"

js1 := "document.getElementsByClassName('oc_1')[36].innerText"
js2 := "document.getElementsByClassName('oc_3')[36].innerText"
js3 := "document.getElementsByClassName('oc_5')[36].innerText"

js1 := "document.getElementsByClassName('oc_1')[37].innerText"
js2 := "document.getElementsByClassName('oc_3')[37].innerText"
js3 := "document.getElementsByClassName('oc_5')[37].innerText"

js1 := "document.getElementsByClassName('oc_1')[38].innerText"
js2 := "document.getElementsByClassName('oc_3')[38].innerText"
js3 := "document.getElementsByClassName('oc_5')[38].innerText"

js1 := "document.getElementsByClassName('oc_1')[39].innerText"
js2 := "document.getElementsByClassName('oc_3')[39].innerText"
js3 := "document.getElementsByClassName('oc_5')[39].innerText"


Не обращайте внимание на "js1 :=", код основной на AHK.
Сами JS'ы в ковычках, document.getElementsByClassName('oc_1')[39].innerText итд.

Мне нужно чтобы все скрипты были объединены в 1, где я по порядку получу сразу все данные.

Заранее спасибо за помощь
Ответить с цитированием