Learn with H4RDIXx & redzed
Open in Telegram
Learn with meeee about anything 🗿🫶
Show moreThe country is not specifiedThe category is not specified
239
Subscribers
-124 hours
-67 days
-530 days
Posts Archive
import requests
from flask import Flask , jsonify
from google_play_scraper import app as ah
data = ah(
"com.dts.freefireth",
lang="fr",
country="CA"
)
version = data["version"]
app = Flask(name)
@app.route("/")
def up():
x = requests.get(
f"https://version.ggwhitehawk.com/live/ver.php"
f"?version={version}&lang=en&device=android&channel=android"
f"&appsttore=googleplay®ion=en&whitelist_version=1.3.0"
f"&whitelist_sp_version=1.0.0&device_name=google%20G011A"
f"&device_CPU=ARMv7%20VFPv3%20NEON%20VMH"
f"&device_GPU=Adreno%20(TM)%20640&device_mem=1993").json()
url = x.get("server_url")
ob = x.get("latest_release_version")
ver = x.get("remote_version")
return jsonify (url = url , ob = ob , version = ver)
if name == 'main':
app.run("0.0.0.0" , 3965)
use return jsonify to print the variables( url , ob , version)
data = ah(
"com.dts.freefireth",
lang="fr",
country="CA"
)
version = data["version"]
use this to get the version app to use it in https://version.ggwhitehawk.com request because this url want the version game to work
the response is large but i want to get "server_url" , "latest_release_version" , "remote_version" soo i use r.get to get Just what we needBY H4RDIXXX FOR LEARN
Repost from H4RDIXx channel
New Method to Grant Token without captcha and without eror 429 (too many requests)
API :
https://h4x-token.vercel.app/oauth/guest/token/grantRequest : POST data :
{"uid": "Your UID Here", "password": "Your Password Here"}Response :
{"code":0,"data":{"refresh_expiry_time":1783866094,"expiry_time":1782570094,"uid":4333750383,"open_id":"42364658de716bd804cd16997333c51d","access_token":"fef288d13b25dff920e42a629ed93a5d8a0476445db8f56a40cdc7341e6cc252","main_active_platform":4,"expires_in":1296000,"token_type":"Bearer","platform":4,"create_time":1781274094,"scope":["get_user_info","get_friends","payment","send_request"],"refresh_token":"caf043c663dcefe4907c6207769e92acebb64710efb0393aa77787428b814f18"}}BY: @S_3_0_3
Next videos in this week
1 - variables (This is part of a series on learning Python and Basics)
2- Inline keyboard buttons ( telegram bot) - Fucntion edit message
if u cann boost channelBOOST it to support the channel CLICK TO BOOST
THE INLINE KEYBOARD BUTTON :
imports :import telebot from telebot.types import InlineKeyboardMarkup , InlineKeyboardButton step 2 create the structure and buttons
the structure =name variable = InlineKeyboardMarkup()
For example :main = InlineKeyboardMarkup() InlineKeyboardMarkup is used to create an inline keyboard. step 3 create the buttons
For example :btn1 = InlineKeyboardButton("hello" , callback_data = "hello") btn2 = InlineKeyboardButton("test" , callback_data = "test")
callback_data is the value that will be sent when the button is clicked. and u can add more buttons.main.add(btn1 , btn2)
use it to add the buttons to the main structure.step 4 send the keyboard
For example :bot.send_message(msg.chat.id , "chose a btn" , reply_markup = main)
reply_markup is used to attach the keyboard to the message.step 5 handle button clicks
For example :@bot.callback_query_handler(func = lambda c : True) def go(c):
this function will run when any inline button is clicked.step 6 check which button was clicked
For example :
if c.data == "hello":
bot.answer_callback_query(c.id , "Hello Brotherrr")
elif c.data == "test":
bot.answer_callback_query(c.id , "Im workkkl")
c.data contains the callback_data of the clicked button.
answer_callback_query sends a popup notification to the user.step 7 run the bot bot.polling()
polling keeps the bot online and waiting for messages and button clicks.in video I made two mistakes 1 - ImportError: cannot import name 'InlineKeyboardButto' from 'telebot.types'
--> I wrote InlineKeyboardButto instead of InlineKeyboardButton.2 - IndentationError: unindent does not match any outer indentation level
--> The indentation (spacing) in the if/elif block is incorrect.
I will work on two things, meaning two series: the first series will be about Python basics, and the second series will be about Telegram bots.
tomorrow i will upload two videos
Video for Python basics (print)
vidéo for inline keyboard buttons telegram
