skrip untuk mengambil quaryid 1. buka google-chrome…
- User
Assistant: 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:
- Assistant
To achieve the task of extracting the
query_idfrom the session storage after loading a webpage, we can follow a series of steps using automation tools. In this instance, I'll lay out a basic structure using Puppeteer, a Node.js library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.