Skip to content

Instantly share code, notes, and snippets.

@mamad-1999
Created September 28, 2024 18:35
Show Gist options
  • Save mamad-1999/92f96d0efd261df3e4755fd0a9e7fc47 to your computer and use it in GitHub Desktop.
Save mamad-1999/92f96d0efd261df3e4755fd0a9e7fc47 to your computer and use it in GitHub Desktop.
Script for Get All tasks of COUB airdrop
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