Created
October 27, 2024 00:58
-
-
Save PxyUp/451b9679fe980eff4c126929f63b4127 to your computer and use it in GitHub Desktop.
Sales steam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"references": { | |
"EuSales": { | |
"connector_config": { | |
"response_type": "HTML", | |
"url": "https://gg.deals/deals/?drm=1&minRating=0&platform=1&store=4", | |
"browser_config": { | |
"playwright": { | |
"timeout": 60000, | |
"wait": 10000, | |
"browser": "WebKit" | |
} | |
} | |
}, | |
"model": { | |
"array_config": { | |
"root_path": ".deals-content #deals-list .list-items > div", | |
"item_config": { | |
"fields": { | |
"name": { | |
"base_field": { | |
"type": "string", | |
"path": ".game-info-title-wrapper a" | |
} | |
}, | |
"link": { | |
"base_field": { | |
"type": "string", | |
"path": ".game-cta .shop-link", | |
"html_attribute": "href", | |
"generated": { | |
"formatted": { | |
"template": "https://gg.deals{PL}" | |
} | |
} | |
} | |
}, | |
"discount": { | |
"base_field": { | |
"type": "string", | |
"path": ".price-widget .discount" | |
} | |
}, | |
"price": { | |
"base_field": { | |
"type": "string", | |
"path": ".price-wrapper span.game-price-new" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"item": { | |
"connector_config": { | |
"response_type": "json", | |
"reference_config": { | |
"name": "EuSales" | |
} | |
}, | |
"model": { | |
"base_field": { | |
"type": "array", | |
"generated": { | |
"model": { | |
"model": { | |
"base_field": { | |
"type": "boolean", | |
"generated": { | |
"static": { | |
"type": "boolean", | |
"value": "true" | |
} | |
} | |
} | |
}, | |
"connector_config": { | |
"response_type": "json", | |
"url": "https://api.telegram.org/bot{{{FromEnv=BOT_TOKEN}}}/sendMessage", | |
"server_config": { | |
"headers": { | |
"Content-Type": "application/json" | |
}, | |
"method": "POST", | |
"body": "{\"chat_id\":\"-1002266774017\", \"parse_mode\":\"MarkdownV2\", \"link_preview_options\":{\"is_disabled\":true}, \"text\":\"\\*Лучшие скидки за сегодня в Steam\\*\\n\\n{{{FromExp=join(map(fromJSON(fResJson), {let name=.name; let link=.link; let price=.price; let discount=.discount; string(#index + 1) + '\\\\. [' + reduce(['-', '\\'', '.', '!', '#'], replace(#acc, #, '\\\\' + #), name) + '](' + link + ')' + ' ' + reduce(['-', '\\'', '.', '!', '#'], replace(#acc, #, '\\\\' + #), price) + ' скидка *' + reduce(['-', '\\'', '.', '!', '#'], replace(#acc, #, '\\\\' + #), discount) + '*'}), '\\n')}}}\\n\\n\\\\#it\\n\\nСделано с помощью [Fitter](https://github.com/PxyUp/fitter) и [конфига](https://gist.github.com/PxyUp/451b9679fe980eff4c126929f63b4127)\"}" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment