| import requests | |
| import json | |
| url = "https://cdn.webook.com/" | |
| headers = { | |
| "Accept": "*/*", | |
| "Accept-Encoding": "gzip, deflate, br, zstd", | |
| "Accept-Language": "en-US,en;q=0.9,ar;q=0.8", | |
| "Content-Type": "application/json", | |
| "Origin": "https://webook.com", | |
| "Referer": "https://webook.com/", | |
| "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", | |
| } | |
| payload = { | |
| "query": """query getEventListing($lang:String,$limit:Int,$skip:Int,$where:EventFilter,$order:[EventOrder]){ | |
| eventCollection(locale:$lang,limit:$limit,skip:$skip,where:$where,order:$order){ | |
| total items{ | |
| __typename sys{id}id title subtitle slug ticketingUrlSlug | |
| image11{title sys{id publishedAt}url width height contentType} | |
| image31{title sys{id publishedAt}url width height contentType} | |
| startingPrice currencyCode | |
| schedule{title openTitle openDateTime closeDateTime openScheduleText} | |
| isStreamingEvent zoneEntryIncluded streamingUrl buttonLabel cardButtonLabel | |
| eventType buttonLink | |
| zone{id slug title zoneLogo{title sys{id publishedAt}url width height contentType} | |
| sponsorLogo{title sys{id publishedAt}url width height contentType}} | |
| location{title address city countryCode seactionHeader location{lat lon} | |
| banner{title sys{id publishedAt}url width height contentType} accessibility} | |
| category{id title slug} isComingSoon organizationSlug | |
| carousalCollection(limit:10){ | |
| items{title sys{id publishedAt}url width height contentType} | |
| } | |
| } | |
| } | |
| }""", | |
| "variables": { | |
| "order": ["order_ASC", "sys_publishedAt_DESC"], | |
| "lang": "ar-SA", | |
| "limit": 7, | |
| "skip": 0, | |
| "where": { | |
| "visibility_not": "private", | |
| "OR": [ | |
| {"schedule": {"closeDateTime_exists": False}}, | |
| {"schedule": {"closeDateTime_gte": "2025-05-28T22:00:00.000Z"}} | |
| ], | |
| "AND": [ | |
| {}, | |
| {}, | |
| { | |
| "OR": [ | |
| {"cmsTags": {"slug_in": ["football"]}} | |
| ] | |
| }, | |
| {}, | |
| {}, | |
| { | |
| "OR": [ | |
| { | |
| "schedule": { | |
| "openDateTime_lte": "2025-05-29T20:59:59.999Z", | |
| "closeDateTime_gte": "2025-05-28T21:00:00.000Z" | |
| } | |
| }, | |
| { | |
| "schedule": { | |
| "openDateTime_gte": "2025-05-28T21:00:00.000Z", | |
| "openDateTime_lte": "2025-05-29T20:59:59.999Z" | |
| } | |
| }, | |
| { | |
| "schedule": { | |
| "openDateTime_lte": "2025-05-29T20:59:59.999Z", | |
| "closeDateTime_exists": False | |
| } | |
| } | |
| ] | |
| }, | |
| {} | |
| ] | |
| } | |
| }, | |
| "operationName": "getEventListing" | |
| } | |
| response = requests.post(url, headers=headers, json=payload) | |
| print(f"Status Code: {response.status_code}") | |
| print("Response JSON:") | |
| print(json.dumps(response.json(), indent=2, ensure_ascii=False)) | |