{"id":218,"date":"2024-12-09T12:16:48","date_gmt":"2024-12-09T12:16:48","guid":{"rendered":"https:\/\/punkrecords.tech\/?page_id=218"},"modified":"2024-12-09T12:35:48","modified_gmt":"2024-12-09T12:35:48","slug":"one-piece-chapter-bot","status":"publish","type":"page","link":"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot","title":{"rendered":"One Piece Chapter Bot"},"content":{"rendered":"\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(201, 218, 248, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-encoded=\"true\" data-code=\"import%20discord%0Aimport%20requests%0Aimport%20asyncio%0Afrom%20bs4%20import%20BeautifulSoup%0Afrom%20discord.ext%20import%20commands%0Aimport%20re%0A%0A%23%20Bot%20token%20and%20channel%20ID%0Abot_token%20%3D%20''%0Achannel_id%20%3D%20%0A%0A%23%20Set%20up%20Discord%20bot%20with%20specified%20command%20prefix%20and%20intents%0Aintents%20%3D%20discord.Intents.default()%0Aintents.typing%20%3D%20False%0Aintents.presences%20%3D%20False%0Abot%20%3D%20commands.Bot(command_prefix%3D'!'%2C%20intents%3Dintents)%0A%0A%0A%40bot.event%0Aasync%20def%20on_ready()%3A%0A%20%20%20%20%23%20Print%20bot%20name%20when%20it%20successfully%20connects%20to%20Discord%0A%20%20%20%20print(f'Bot%20connected%20as%20%7Bbot.user.name%7D')%0A%20%20%20%20bot.loop.create_task(check_one_piece_chapter())%0A%0A%0A%40bot.command()%0Aasync%20def%20test(ctx)%3A%0A%20%20%20%20%23%20Test%20command%20that%20sends%20a%20message%20to%20the%20channel%0A%20%20%20%20await%20ctx.send('Test%20message%20from%20the%20bot!')%0A%0A%0Adef%20get_latest_chapter_info(url)%3A%0A%20%20%20%20%23%20Function%20to%20retrieve%20the%20latest%20chapter%20info%20from%20the%20specified%20URL%0A%20%20%20%20response%20%3D%20requests.get(url)%0A%20%20%20%20if%20response.status_code%20%3D%3D%20200%3A%0A%20%20%20%20%20%20%20%20soup%20%3D%20BeautifulSoup(response.content%2C%20'html.parser')%0A%0A%20%20%20%20%20%20%20%20%23%20Find%20the%20element%20containing%20the%20latest%20chapter%20information%0A%20%20%20%20%20%20%20%20chapter_element%20%3D%20soup.find('a'%2C%20class_%3D'block%20border%20border-border%20bg-card%20mb-3%20p-3%20rounded')%0A%20%20%20%20%20%20%20%20if%20chapter_element%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20chapter_link%20%3D%20chapter_element%5B'href'%5D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20Extract%20the%20chapter%20number%20from%20the%20chapter%20URL%0A%20%20%20%20%20%20%20%20%20%20%20%20chapter_number%20%3D%20chapter_link.split('%2F')%5B-2%5D.split('-')%5B-1%5D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20Extract%20the%20chapter%20title%20from%20the%20element%20text%0A%20%20%20%20%20%20%20%20%20%20%20%20chapter_title%20%3D%20chapter_element.get_text(strip%3DTrue)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20Extract%20chapter%20number%20and%20title%20using%20regex%0A%20%20%20%20%20%20%20%20%20%20%20%20chapter_title_parts%20%3D%20re.search(r'(%5Cd%2B)(%5BA-Za-z%5D%2B)'%2C%20chapter_title)%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20chapter_title_parts%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chapter_number%20%3D%20chapter_title_parts.group(1)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chapter_title%20%3D%20f%22One%20Piece%20Chapter%20%7Bchapter_number%7D%22%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20Construct%20the%20full%20chapter%20URL%0A%20%20%20%20%20%20%20%20%20%20%20%20chapter_url%20%3D%20f%22https%3A%2F%2Ftcbscans.com%7Bchapter_link%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20chapter_number%2C%20chapter_title%2C%20chapter_url%0A%0A%20%20%20%20%23%20Return%20None%20if%20the%20latest%20chapter%20info%20couldn't%20be%20retrieved%0A%20%20%20%20return%20None%2C%20None%2C%20None%0A%0A%0Aasync%20def%20check_one_piece_chapter()%3A%0A%20%20%20%20%23%20Function%20to%20periodically%20check%20for%20new%20One%20Piece%20chapters%0A%20%20%20%20url%20%3D%20'https%3A%2F%2Ftcbscans.com%2Fmangas%2F5%2Fone-piece'%0A%20%20%20%20latest_chapter_number%20%3D%20None%0A%0A%20%20%20%20while%20True%3A%0A%20%20%20%20%20%20%20%20%23%20Retrieve%20the%20latest%20chapter%20info%0A%20%20%20%20%20%20%20%20chapter_info%20%3D%20get_latest_chapter_info(url)%0A%0A%20%20%20%20%20%20%20%20%23%20Compare%20the%20latest%20chapter%20number%20with%20the%20previously%20stored%20value%0A%20%20%20%20%20%20%20%20if%20chapter_info%20and%20chapter_info%5B0%5D%20!%3D%20latest_chapter_number%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20channel%20%3D%20bot.get_channel(channel_id)%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20channel%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20chapter_number%2C%20chapter_title%2C%20chapter_url%20%3D%20chapter_info%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20chapter_url%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Send%20a%20message%20to%20the%20channel%20indicating%20the%20new%20chapter%20release%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20await%20channel.send(f%22%7Bchapter_title%7D%20has%20been%20released!%20Read%20it%20here%3A%20%7Bchapter_url%7D%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20await%20channel.send(f%22%7Bchapter_title%7D%20has%20been%20released!%22)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Update%20the%20latest%20chapter%20number%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20latest_chapter_number%20%3D%20chapter_info%5B0%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print(f%22Channel%20with%20ID%20%7Bchannel_id%7D%20not%20found.%22)%0A%0A%20%20%20%20%20%20%20%20%23%20Sleep%20for%201%20hour%20before%20checking%20again%0A%20%20%20%20%20%20%20%20await%20asyncio.sleep(3600)%0A%0A%0Abot.run(bot_token)\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> discord<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> requests<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> asyncio<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">from<\/span><span style=\"color: #D8DEE9FF\"> bs4 <\/span><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> BeautifulSoup<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">from<\/span><span style=\"color: #D8DEE9FF\"> discord<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">ext <\/span><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> commands<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> re<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># Bot token and channel ID<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">bot_token <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">channel_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #616E88\"># Set up Discord bot with specified command prefix and intents<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">intents <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> discord<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">Intents<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">default<\/span><span style=\"color: #ECEFF4\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">intents<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">typing <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">False<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">intents<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">presences <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">False<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">bot <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> commands<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">Bot<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9\">command_prefix<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">!<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">intents<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\">intents<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">@<\/span><span style=\"color: #D08770\">bot<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D08770\">event<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">async<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">def<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">on_ready<\/span><span style=\"color: #ECEFF4\">():<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #616E88\"># Print bot name when it successfully connects to Discord<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">print<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">f<\/span><span style=\"color: #A3BE8C\">&#39;Bot connected as <\/span><span style=\"color: #EBCB8B\">{<\/span><span style=\"color: #D8DEE9FF\">bot<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">user<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">name<\/span><span style=\"color: #EBCB8B\">}<\/span><span style=\"color: #A3BE8C\">&#39;<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    bot<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">loop<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">create_task<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">check_one_piece_chapter<\/span><span style=\"color: #ECEFF4\">())<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">@<\/span><span style=\"color: #D08770\">bot<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D08770\">command<\/span><span style=\"color: #ECEFF4\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">async<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">def<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">test<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9\">ctx<\/span><span style=\"color: #ECEFF4\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #616E88\"># Test command that sends a message to the channel<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">await<\/span><span style=\"color: #D8DEE9FF\"> ctx<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">send<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Test message from the bot!<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">def<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">get_latest_chapter_info<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9\">url<\/span><span style=\"color: #ECEFF4\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #616E88\"># Function to retrieve the latest chapter info from the specified URL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    response <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> requests<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">get<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9FF\">url<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> response<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">status_code <\/span><span style=\"color: #81A1C1\">==<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">200<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        soup <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">BeautifulSoup<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9FF\">response<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\">content<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">html.parser<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #616E88\"># Find the element containing the latest chapter information<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        chapter_element <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> soup<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">find<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">a<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">class_<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">block border border-border bg-card mb-3 p-3 rounded<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> chapter_element<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            chapter_link <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> chapter_element<\/span><span style=\"color: #ECEFF4\">[<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">href<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">]<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #616E88\"># Extract the chapter number from the chapter URL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            chapter_number <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> chapter_link<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">split<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">\/<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">)[<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #B48EAD\">2<\/span><span style=\"color: #ECEFF4\">].<\/span><span style=\"color: #88C0D0\">split<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">-<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">)[<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">]<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #616E88\"># Extract the chapter title from the element text<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            chapter_title <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> chapter_element<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">get_text<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9\">strip<\/span><span style=\"color: #81A1C1\">=True<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #616E88\"># Extract chapter number and title using regex<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            chapter_title_parts <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> re<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">search<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">r<\/span><span style=\"color: #ECEFF4\">&#39;(<\/span><span style=\"color: #EBCB8B\">\\d<\/span><span style=\"color: #81A1C1\">+<\/span><span style=\"color: #ECEFF4\">)([<\/span><span style=\"color: #EBCB8B\">A-Za-z<\/span><span style=\"color: #ECEFF4\">]<\/span><span style=\"color: #81A1C1\">+<\/span><span style=\"color: #ECEFF4\">)&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> chapter_title<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> chapter_title_parts<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                chapter_number <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> chapter_title_parts<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">group<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                chapter_title <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">f<\/span><span style=\"color: #A3BE8C\">&quot;One Piece Chapter <\/span><span style=\"color: #EBCB8B\">{<\/span><span style=\"color: #D8DEE9FF\">chapter_number<\/span><span style=\"color: #EBCB8B\">}<\/span><span style=\"color: #A3BE8C\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #616E88\"># Construct the full chapter URL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            chapter_url <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">f<\/span><span style=\"color: #A3BE8C\">&quot;https:\/\/tcbscans.com<\/span><span style=\"color: #EBCB8B\">{<\/span><span style=\"color: #D8DEE9FF\">chapter_link<\/span><span style=\"color: #EBCB8B\">}<\/span><span style=\"color: #A3BE8C\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> chapter_number<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> chapter_title<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> chapter_url<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #616E88\"># Return None if the latest chapter info couldn&#39;t be retrieved<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">None<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">None<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">None<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">async<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">def<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">check_one_piece_chapter<\/span><span style=\"color: #ECEFF4\">():<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #616E88\"># Function to periodically check for new One Piece chapters<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    url <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">https:\/\/tcbscans.com\/mangas\/5\/one-piece<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    latest_chapter_number <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">None<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">while<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">True<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #616E88\"># Retrieve the latest chapter info<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        chapter_info <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">get_latest_chapter_info<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9FF\">url<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #616E88\"># Compare the latest chapter number with the previously stored value<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> chapter_info <\/span><span style=\"color: #81A1C1\">and<\/span><span style=\"color: #D8DEE9FF\"> chapter_info<\/span><span style=\"color: #ECEFF4\">[<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">]<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">!=<\/span><span style=\"color: #D8DEE9FF\"> latest_chapter_number<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            channel <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> bot<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">get_channel<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9FF\">channel_id<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> channel<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                chapter_number<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> chapter_title<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> chapter_url <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> chapter_info<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> chapter_url<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                    <\/span><span style=\"color: #616E88\"># Send a message to the channel indicating the new chapter release<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                    <\/span><span style=\"color: #81A1C1\">await<\/span><span style=\"color: #D8DEE9FF\"> channel<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">send<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">f<\/span><span style=\"color: #A3BE8C\">&quot;<\/span><span style=\"color: #EBCB8B\">{<\/span><span style=\"color: #D8DEE9FF\">chapter_title<\/span><span style=\"color: #EBCB8B\">}<\/span><span style=\"color: #A3BE8C\"> has been released! Read it here: <\/span><span style=\"color: #EBCB8B\">{<\/span><span style=\"color: #D8DEE9FF\">chapter_url<\/span><span style=\"color: #EBCB8B\">}<\/span><span style=\"color: #A3BE8C\">&quot;<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                <\/span><span style=\"color: #81A1C1\">else<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                    <\/span><span style=\"color: #81A1C1\">await<\/span><span style=\"color: #D8DEE9FF\"> channel<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">send<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">f<\/span><span style=\"color: #A3BE8C\">&quot;<\/span><span style=\"color: #EBCB8B\">{<\/span><span style=\"color: #D8DEE9FF\">chapter_title<\/span><span style=\"color: #EBCB8B\">}<\/span><span style=\"color: #A3BE8C\"> has been released!&quot;<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                <\/span><span style=\"color: #616E88\"># Update the latest chapter number<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                latest_chapter_number <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> chapter_info<\/span><span style=\"color: #ECEFF4\">[<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">]<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #81A1C1\">else<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">                <\/span><span style=\"color: #88C0D0\">print<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">f<\/span><span style=\"color: #A3BE8C\">&quot;Channel with ID <\/span><span style=\"color: #EBCB8B\">{<\/span><span style=\"color: #D8DEE9FF\">channel_id<\/span><span style=\"color: #EBCB8B\">}<\/span><span style=\"color: #A3BE8C\"> not found.&quot;<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #616E88\"># Sleep for 1 hour before checking again<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">await<\/span><span style=\"color: #D8DEE9FF\"> asyncio<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">sleep<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #B48EAD\">3600<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">bot<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">run<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9FF\">bot_token<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":29,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-218","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>One Piece Chapter Bot - Punkrecords.tech<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"One Piece Chapter Bot - Punkrecords.tech\" \/>\n<meta property=\"og:url\" content=\"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot\" \/>\n<meta property=\"og:site_name\" content=\"Punkrecords.tech\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-09T12:35:48+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/index.php\\\/portfolio\\\/one-piece-chapter-bot\",\"url\":\"https:\\\/\\\/punkrecords.tech\\\/index.php\\\/portfolio\\\/one-piece-chapter-bot\",\"name\":\"One Piece Chapter Bot - Punkrecords.tech\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/#website\"},\"datePublished\":\"2024-12-09T12:16:48+00:00\",\"dateModified\":\"2024-12-09T12:35:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/index.php\\\/portfolio\\\/one-piece-chapter-bot#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/punkrecords.tech\\\/index.php\\\/portfolio\\\/one-piece-chapter-bot\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/index.php\\\/portfolio\\\/one-piece-chapter-bot#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/punkrecords.tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Portfolio\",\"item\":\"https:\\\/\\\/punkrecords.tech\\\/index.php\\\/portfolio\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"One Piece Chapter Bot\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/#website\",\"url\":\"https:\\\/\\\/punkrecords.tech\\\/\",\"name\":\"Punkrecords.tech\",\"description\":\"A Logbook of Dreams, Ideas, and Creation\",\"publisher\":{\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/punkrecords.tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/#organization\",\"name\":\"Punkrecords.tech\",\"url\":\"https:\\\/\\\/punkrecords.tech\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/punkrecords.tech\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Quotation_2.svg\",\"contentUrl\":\"https:\\\/\\\/punkrecords.tech\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/Quotation_2.svg\",\"width\":82,\"height\":67,\"caption\":\"Punkrecords.tech\"},\"image\":{\"@id\":\"https:\\\/\\\/punkrecords.tech\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"One Piece Chapter Bot - Punkrecords.tech","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot","og_locale":"en_US","og_type":"article","og_title":"One Piece Chapter Bot - Punkrecords.tech","og_url":"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot","og_site_name":"Punkrecords.tech","article_modified_time":"2024-12-09T12:35:48+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot","url":"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot","name":"One Piece Chapter Bot - Punkrecords.tech","isPartOf":{"@id":"https:\/\/punkrecords.tech\/#website"},"datePublished":"2024-12-09T12:16:48+00:00","dateModified":"2024-12-09T12:35:48+00:00","breadcrumb":{"@id":"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/punkrecords.tech\/index.php\/portfolio\/one-piece-chapter-bot#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/punkrecords.tech\/"},{"@type":"ListItem","position":2,"name":"Portfolio","item":"https:\/\/punkrecords.tech\/index.php\/portfolio"},{"@type":"ListItem","position":3,"name":"One Piece Chapter Bot"}]},{"@type":"WebSite","@id":"https:\/\/punkrecords.tech\/#website","url":"https:\/\/punkrecords.tech\/","name":"Punkrecords.tech","description":"A Logbook of Dreams, Ideas, and Creation","publisher":{"@id":"https:\/\/punkrecords.tech\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/punkrecords.tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/punkrecords.tech\/#organization","name":"Punkrecords.tech","url":"https:\/\/punkrecords.tech\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/punkrecords.tech\/#\/schema\/logo\/image\/","url":"https:\/\/punkrecords.tech\/wp-content\/uploads\/2024\/12\/Quotation_2.svg","contentUrl":"https:\/\/punkrecords.tech\/wp-content\/uploads\/2024\/12\/Quotation_2.svg","width":82,"height":67,"caption":"Punkrecords.tech"},"image":{"@id":"https:\/\/punkrecords.tech\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/pages\/218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":4,"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/pages\/218\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/pages\/218\/revisions\/228"}],"up":[{"embeddable":true,"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/pages\/29"}],"wp:attachment":[{"href":"https:\/\/punkrecords.tech\/index.php\/wp-json\/wp\/v2\/media?parent=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}