import requests from datetime import datetime print("📰 हिंदी न्यूज़ एक्सट्रैक्टर") print("=" * 40) # हिंदी न्यूज़ API [citation:1] url = "https://hindustantimes-1-t3366110.deta.app/top-india-news" response = requests.get(url) news_list = response.json() print(f"✅ {len(news_list)} खबरें मिलीं!\n") # पहली खबर लें first_news = news_list[0] print(f"📌 खबर: {first_news}") # Hindi article बनाएँ hindi_article = f"""

🔥 BREAKING: {first_news[:60]}...

प्रकाशित: {datetime.now().strftime('%B %d, %Y')}


📌 मुख्य बातें

{first_news} यह एक महत्वपूर्ण घटनाक्रम है जिस पर सभी की नज़र है।

📊 पूरी जानकारी

यह खबर ताज़ा है और इस पर लगातार अपडेट आ रहे हैं। अधिक जानकारी के लिए बने रहें।

🎯 क्या है मामला

इस घटनाक्रम का देशभर में असर देखने को मिल रहा है। विशेषज्ञों का कहना है कि इसके दूरगामी परिणाम हो सकते हैं।

📝 सारांश

यह खबर अभी शुरुआती चरण में है। जैसे-जैसे और जानकारी आएगी, हम आपको अपडेट करते रहेंगे।


🤖 ऑटो-जनरेटेड हिंदी न्यूज़ | {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}

""" # Save to file with open("hindi_news_ready.html", "w", encoding="utf-8") as f: f.write(hindi_article) print("\n✅ हिंदी आर्टिकल तैयार: hindi_news_ready.html") print("📋 अब Blogger पर copy-paste करें!")

Comments

Popular posts from this blog