skrip untuk mengambil quaryid 1. buka google-chrome…
- User
Assistant: User: User: skrip untuk mengambil quary_id
- buka google-chrome --profile-directory="Erlangga" --new-window #modeheadless
disini entah bagaimana caranya cari Request URL: https://telegram.org/js/telegram-web-app.js referer: https://babydogeclikerbot.com/
is third=party Yes, because the origin is outside of the top-level site
Storage -> Session storage -> key __telegram__initParams -> value
contoh hasil { "tgWebAppData": "query_id=AAGZWj1YAAAAAJlaPVhvMaV4&user=%7B%22id%22%3A1480415897%2C%22first_name%22%3A%22HayabuQuack%20%F0%9F%86%93%22%2C%22last_name%22%3A%22%22%2C%22username%22%3A%22HayabuQuack%22%2C%22language_code%22%3A%22id%22%2C%22allows_write_to_pm%22%3Atrue%7D&auth_date=1728105309&hash=42c45d181cf0cda1c9925d7b242ed44bc6eed8118c4b1eb7a3f7a8577a189491", "tgWebAppVersion": "7.10", "tgWebAppPlatform": "web", "tgWebAppThemeParams": "{"bg_color":"#212121","button_color":"#8774e1","button_text_color":"#ffffff","hint_color":"#aaaaaa","link_color":"#8774e1","secondary_bg_color":"#181818","text_color":"#ffffff","header_bg_color":"#212121","accent_text_color":"#8774e1","section_bg_color":"#212121","section_header_text_color":"#8774e1","subtitle_text_color":"#aaaaaa","destructive_text_color":"#ff595a"}" }
ambil query_id=AAGZWj1YAAAAAJlaPVhvMaV4&user=%7B%22id%22%3A1480415897%2C%22first_name%22%3A%22HayabuQuack%20%F0%9F%86%93%22%2C%22last_name%22%3A%22%22%2C%22username%22%3A%22HayabuQuack%22%2C%22language_code%22%3A%22id%22%2C%22allows_write_to_pm%22%3Atrue%7D&auth_date=1728105309&hash=42c45d181cf0cda1c9925d7b242ed44bc6eed8118c4b1eb7a3f7a8577a189491
fetch("https://babydogeclikerbot.com/", { "headers": { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7", "accept-language": "id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7", "if-modified-since": "Fri, 04 Oct 2024 14:49:47 GMT", "priority": "u=0, i", "sec-ch-ua": ""Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": ""Linux"", "sec-fetch-dest": "iframe", "sec-fetch-mode": "navigate", "sec-fetch-site": "cross-site", "sec-fetch-user": "?1", "upgrade-insecure-requests": "1", "cookie": "_ym_uid=1727226890788947977; _ym_d=1727226890; _ym_visorc=b; _ym_isad=2", "Referer": "https://web.telegram.org/", "Referrer-Policy": "strict-origin-when-cross-origin" }, "body": null, "method": "GET" });
Assistant: To automate the process of extracting the from session storage in a browser, you can use Python scripts with libraries like Selenium or Playwright. For this example, I'll demonstrate a basic approach using Selenium. Before you begin, make sure you have the required packages installed:
- Assistant
The fetch request you've shared is a JavaScript function used to make a network request to the specified URL. In this case, it targets the
https://babydogeclikerbot.com/URL with custom headers and a GET method.To break down what it does:
-
Headers: Custom headers are included in the request, such as
accept,accept-language, and others that mimic a real browser request. These headers can help in bypassing certain restrictions or optimizations that rely on recognizing genuine browser requests. -
Cookies: The request also carries a
cookievalue, which may be required for authenticated sessions or to maintain session state. -
Referer and Policy: The
RefererandReferrer-Policyheaders specify the referring page and how much referrer information should be passed along to the server.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.