below is a scraper code. it return `error: 'Page' object has no attribute 'evaluate_on_new_document'` error. please fix it:

import random
import time
from playwright.async_api import async_playwright
from ratelimit import limits, sleep_and_retry
import asyncio

proxy_servers = [
    {"ip": "123.123.123.123", "port": "8080", "username": "user", "password": "pass"},
    # add more proxies
]

def get_next_proxy():
    while True:
        for proxy in proxy_servers:
            yield {
                'server': f'http://{proxy["ip"]}:{proxy["port"]}',
                'username': proxy['username'],
                'password': proxy['password'],
            }

proxy_generator = get_next_proxy()

user_agents = [
    # your user agent list
]

@sleep_and_retry
@limits(calls=5, period=60)
async def call_with_rate_limit_async(func, *args, **kwargs):
    return await func(*args, **kwargs)

async def perform_stealth(page):
    """
    Implements stealth-like features for Playwright.
    Mimics human activity to avoid detection.
    """
    await page.evaluate_on_new_document("""
        // mask webdriver property
        Object.defineProperty(navigator, 'webdriver', { get: () => false });
        
        // override user-agent properties to look more natural
        Object.defineProperty(navigator, 'platform', { get: () => 'Win32' });
        Object.defineProperty(navigator, 'vendor', { get: () => 'Google Inc.' });

        // mock plugins and mime types
        Object.defineProperty(navigator, 'plugins', {
            get: () => [1, 2, 3]  // mimic real plugins count
        });
        Object.defineProperty(navigator, 'languages', {
            get: () => ['en-US', 'en']  // mimic browser languages
        });

        // set random screen size and color depth
        window.screen.width = Math.floor(Math.random() * (1920 - 1366) + 1366);
        window.screen.height = Math.floor(Math.random() * (1080 - 768) + 768);
        window.screen.colorDepth = 24;
    """)

    # simulate random mouse movements
    for _ in range(random.randint(3, 7)):
        x, y = random.randint(0, 1920), random.randint(0, 1080)
        await page.mouse.move(x, y, steps=random.randint(5, 20))
        await asyncio.sleep(random.uniform(0.1, 0.5))


async def main():
    async with async_playwright() as p:
        browser = await p.chromium.launch(headless=False)  # use headless=False for stealth
        for _ in range(5):  # number of queries
            try:
                # get proxy and user agent
                proxy = next(proxy_generator)
                user_agent = random.choice(user_agents)

                # create browser context
                context = await browser.new_context(
                    proxy=proxy,
                    user_agent=user_agent,
                    viewport={"width": 1366, "height": 768},  # realistic viewport
                    locale="en-US",  # set language
                    timezone_id="America/New_York",  # set timezone
                    permissions=["geolocation"],  # set permissions
                    geolocation={"latitude": 40.7128, "longitude": -74.0060},  # set fake geolocation
                )
                page = await context.new_page()

                # perform stealth tweaks
                await perform_stealth(page)

                query = 'sadness'
                url_scholar = f'https://scholar.google.com/scholar?q={query}&hl=en&gl=us&start=0'

                print(f"using proxy: {proxy['server']}, user-agent: {user_agent}")

                # navigate with rate-limited calls
                response = await call_with_rate_limit_async(page.goto, url_scholar, timeout=60000)
                if response.status != 200:
                    print(f"non-200 response: {response.status}")
                    raise Exception("response error")

                # scraping example
                html = await page.content()
                print(html[:500])  # preview page content

                # add random scrolls to mimic human reading
                for _ in range(random.randint(3, 10)):
                    scroll_distance = random.randint(200, 800)
                    await page.evaluate(f"window.scrollBy(0, {scroll_distance});")
                    await asyncio.sleep(random.uniform(1, 3))

                await context.close()
                time.sleep(random.randint(5, 15))  # random delay

            except Exception as e:
                print(f"error: {e}, retrying...")
                continue

        await browser.close()

asyncio.run(main())