Возможно, я не полно объяснил вопрос. Хочу понять, как скроллить без странного эффекта с пустым пространством:
Скрипт ниже вытворяет что то странное, поднимая саму страницу вверх (а внизу - пустое пространство)
В целом, я нашел рабочий скрипт:
let elements = document.querySelectorAll('.search-snippet-view'); if (elements.length > 0) { let lastElement = elements[elements.length - 1]; lastElement.scrollIntoView({ behavior: 'smooth', block: 'center' }); setTimeout(() => { // Get the position of the last element const lastElementRect = lastElement.getBoundingClientRect(); const viewportHeight = window.innerHeight || document.documentElement.clientHeight; // Check if the last element is fully within the viewport if (lastElementRect.bottom <= viewportHeight) { // If the last element is fully in view, stop scrolling return; } // If the last element is not fully in view, scroll down window.scrollBy(0, 200); }, 500); // Wait for the initial scroll to complete before scrolling down 200px } })();
Ребят, не могу зарегать steam аккаунт на запросах. Прокси использую резидентские и когда руками регаю через любой антидетект браузер с этих проксей, то все в порядке, решаю каптчу и иду дальше. На запросах же всегда получаю ошибку "Your response to the CAPTCHA appears to be invalid. Please re-verify that you're not a robot below."