Created
September 28, 2024 18:35
-
-
Save mamad-1999/92f96d0efd261df3e4755fd0a9e7fc47 to your computer and use it in GitHub Desktop.
Script for Get All tasks of COUB airdrop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
# Authorization token (replace with your actual token) | |
auth_token = 'YOUR_TOKEN' | |
# Set up headers | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0', | |
'Authorization': auth_token | |
} | |
# Base URL | |
base_url = 'https://rewards.coub.com/api/v2/complete_task' | |
for task_id in range(1, 50): | |
# Make a GET request | |
params = {'task_reward_id': task_id} | |
response = requests.get(base_url, headers=headers, params=params) | |
print(f"Task ID {task_id}: Status Code {response.status_code}") | |
if response.status_code == 200: | |
print(response.json()) | |
else: | |
print(f"Failed to complete task {task_id}, Response: {response.text}") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment