Spaces:
Paused
Paused
| import requests | |
| url = "https://cdn.webook.com/" | |
| headers = { | |
| "Accept": "*/*", | |
| "Content-Type": "application/json", | |
| "Origin": "https://webook.com", | |
| "Referer": "https://webook.com", | |
| "User-Agent": "Mozilla/5.0" | |
| } | |
| payload = { | |
| "query": """ | |
| query getEventDetail($lang:String,$limit:Int,$skip:Int,$where:EventFilter,$order:[EventOrder]) { | |
| eventCollection(locale:$lang, limit:$limit, skip:$skip, where:$where, order:$order) { | |
| items { | |
| id | |
| title | |
| subtitle | |
| slug | |
| ticketingUrlSlug | |
| startingPrice | |
| currencyCode | |
| isStreamingEvent | |
| zoneEntryIncluded | |
| streamingUrl | |
| buttonLabel | |
| cardButtonLabel | |
| eventType | |
| authGaurd | |
| buttonLink | |
| isComingSoon | |
| whatToKnow | |
| specialPromotion | |
| showResellBanner | |
| organizationSlug | |
| visibility | |
| image11 { | |
| sys { id publishedAt } | |
| url width height contentType title | |
| } | |
| image31 { | |
| sys { id publishedAt } | |
| url width height contentType title | |
| } | |
| description { | |
| json | |
| links { assets { block { sys { id } } } } | |
| } | |
| schedule { | |
| title openTitle openDateTime closeDateTime openScheduleText | |
| } | |
| season { | |
| title slug | |
| } | |
| category { | |
| id title slug | |
| } | |
| location { | |
| title address city countryCode seactionHeader | |
| location { lat lon } | |
| accessibility | |
| banner { | |
| sys { id publishedAt } | |
| url width height contentType title | |
| } | |
| } | |
| seo { | |
| title description keywords noindex | |
| image { | |
| sys { id publishedAt } | |
| url width height contentType title | |
| } | |
| } | |
| cmsTagsCollection(limit: 10) { | |
| items { | |
| title slug id | |
| background { | |
| sys { id publishedAt } | |
| url width height contentType title | |
| } | |
| icon { | |
| sys { id publishedAt } | |
| url width height contentType title | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| """, | |
| "variables": { | |
| "order": "order_ASC", | |
| "lang": "en-US", | |
| "limit": 1, | |
| "where": { | |
| "slug": "wwe-two-nights-bundle-wwe-tickets--season--374653" | |
| } | |
| }, | |
| "operationName": "getEventDetail" | |
| } | |
| response = requests.post(url, headers=headers, json=payload) | |
| # Print response | |
| try: | |
| data = response.json() | |
| print(data) | |
| except Exception as e: | |
| print("Error:", e) | |
| print(response.text) | |