31 lines
700 B
Python
31 lines
700 B
Python
|
|
import sys
|
|
import os
|
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
from dotenv import load_dotenv
|
|
load_dotenv()
|
|
|
|
from config import get_all_plants
|
|
from crawlers.kremc import fetch_data
|
|
|
|
def debug_kremc_realtime():
|
|
plants = get_all_plants()
|
|
target = next((p for p in plants if p['id'] == 'kremc-05'), None)
|
|
|
|
if not target:
|
|
print("Plant 5 not found")
|
|
return
|
|
|
|
print(f"Debug target: {target['name']}")
|
|
|
|
try:
|
|
print("Fetching data...")
|
|
results = fetch_data(target)
|
|
print(f"Results: {results}")
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
debug_kremc_realtime()
|