https://augustpinch.com/qnd7d2fhd?key=ed5dbed8ecdd9af92e2b54e652945382
8
Wednesday, June 11, 2025
ONLINE EARNING TOOL
import requests
import pandas as pd
from datetime import datetime
class OnlineEarningTool:
def __init__(self):
self.upwork_api_key = "YOUR_UPWORK_API_KEY"
self.amazon_api_key = "YOUR_AMAZON_AFFILIATE_KEY"
self.fiverr_api_key = "YOUR_FIVERR_API_KEY" # If available
self.earnings_data = []
def fetch_upwork_jobs(self, keyword="Python"):
"""Fetch latest Upwork jobs matching a keyword."""
url = f"https://api.upwork.com/api/v3/jobs?q={keyword}"
headers = {"Authorization": f"Bearer {self.upwork_api_key}"}
try:
response = requests.get(url, headers=headers)
jobs = response.json().get("jobs", [])
print(f"š Found {len(jobs)} Upwork jobs for '{keyword}'")
return jobs
except Exception as e:
print(f"❌ Upwork API Error: {e}")
return []
def auto_apply_upwork(self, jobs, min_pay=50):
"""Auto-apply to Upwork jobs with minimum pay."""
applied = 0
for job in jobs:
if job.get("budget", 0) >= min_pay:
job_id = job.get("id")
apply_url = f"https://upwork.com/jobs/{job_id}/apply"
print(f"✅ Applied to job: {job['title']} (${job['budget']})")
applied += 1
print(f"šØ Applied to {applied} jobs.")
return applied
def track_amazon_affiliate_earnings(self):
"""Check Amazon Affiliate earnings via API."""
url = "https://affiliate-api.amazon.com/report"
params = {
"api_key": self.amazon_api_key,
"report_type": "earnings"
}
try:
response = requests.get(url, params=params)
earnings = response.json().get("earnings", 0)
print(f"š° Amazon Affiliate Earnings: ${earnings:.2f}")
return earnings
except Exception as e:
print(f"❌ Amazon API Error: {e}")
return 0
def analyze_earnings(self):
"""Store and analyze earnings over time."""
df = pd.DataFrame(self.earnings_data)
if not df.empty:
df.to_csv("earnings_history.csv", index=False)
print("š Earnings data saved to 'earnings_history.csv'")
print(df.tail())
else:
print("No earnings data yet.")
def run(self):
"""Main automation loop."""
print("\nš Starting Online Earning Automation...")
# 1. Fetch & apply to Upwork jobs
jobs = self.fetch_upwork_jobs("Python")
self.auto_apply_upwork(jobs, min_pay=30)
# 2. Track Amazon Affiliate earnings
amazon_earnings = self.track_amazon_affiliate_earnings()
self.earnings_data.append({
"date": datetime.now().strftime("%Y-%m-%d"),
"source": "Amazon Affiliate",
"amount": amazon_earnings
})
# 3. Analyze & save data
self.analyze_earnings()
if __name__ == "__main__":
tool = OnlineEarningTool()
tool.run()
Subscribe to:
Post Comments (Atom)
SMART AFFILIATE LINK GENERATOR
Smart Affiliate Link Generator š° Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
Smart Affiliate Link Generator š° Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
*Online Stock Photography: Sell Your Snaps* Are you a budding photographer with a penchant for snapping stunning images? Look no further! O...
-
AI Story Writing Tool AI Story Writing Tool Moral Educational Historical ...
No comments:
Post a Comment