enrich data

This commit is contained in:
Tour
2025-12-07 01:26:48 +01:00
parent bb7f4bbe9d
commit d09ee5574f
14 changed files with 1221 additions and 7 deletions

67
check_graphql_full.py Normal file
View File

@@ -0,0 +1,67 @@
#!/usr/bin/env python3
"""Check if GraphQL has viewing/pickup data"""
import asyncio
import json
import sys
sys.path.insert(0, 'src')
from graphql_client import GRAPHQL_ENDPOINT
import aiohttp
# Expanded query to check for all available fields
EXTENDED_QUERY = """
query LotBiddingData($lotDisplayId: String!, $locale: String!, $platform: Platform!) {
lotDetails(displayId: $lotDisplayId, locale: $locale, platform: $platform) {
lot {
id
displayId
auctionId
currentBidAmount { cents currency }
initialAmount { cents currency }
nextMinimalBid { cents currency }
bidsCount
startDate
endDate
# Try to find viewing/pickup fields
viewingDays { startDate endDate city countryCode }
collectionDays { startDate endDate city countryCode }
pickupDays { startDate endDate city countryCode }
}
auction {
id
displayId
viewingDays { startDate endDate city countryCode }
collectionDays { startDate endDate city countryCode }
}
}
}
"""
async def main():
variables = {
"lotDisplayId": "A1-28505-5",
"locale": "nl",
"platform": "TWK"
}
payload = {
"query": EXTENDED_QUERY,
"variables": variables
}
try:
async with aiohttp.ClientSession() as session:
async with session.post(GRAPHQL_ENDPOINT, json=payload, timeout=30) as response:
if response.status == 200:
data = await response.json()
print("Full GraphQL Response:")
print(json.dumps(data, indent=2))
else:
print(f"Error: {response.status}")
print(await response.text())
except Exception as e:
print(f"Exception: {e}")
if __name__ == "__main__":
asyncio.run(main())