Open8

YouTube のチャンネルの更新通知を受け取って Lambda を実行する

元小池元小池

参考

https://zenn.dev/meihei/articles/01cd06f729056a

'version': '1.0'' → version': '2.0' へカスタマイズしないと動かない?

元小池元小池

delete

<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<feed xmlns:at="http://purl.org/atompub/tombstones/1.0" xmlns="http://www.w3.org/2005/Atom">
    <at:deleted-entry ref="yt:video:at8lkNACnWA" when="2023-01-05T04:36:24.002785+00:00">
        <link href="https://www.youtube.com/watch?v=at8lkNACnWA"/>
        <at:by>
            <name>Macau Jockey Club 澳門賽馬會</name>
            <uri>https://www.youtube.com/channel/UCCSSLRzI7Libw36LYQSdmgg</uri>
        </at:by>
    </at:deleted-entry>
</feed>
元小池元小池

アップロード

<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<feed xmlns:yt="http://www.youtube.com/xml/schemas/2015" xmlns="http://www.w3.org/2005/Atom">
    <link rel="hub" href="https://pubsubhubbub.appspot.com"/>
    <link rel="self" href="https://www.youtube.com/xml/feeds/videos.xml?channel_id=UCCSSLRzI7Libw36LYQSdmgg"/>
    <title>YouTube video feed</title>
    <updated>2023-01-05T04:32:56.238967766+00:00</updated>
    <entry>
        <id>yt:video:at8lkNACnWA</id>
        <yt:videoId>at8lkNACnWA</yt:videoId>
        <yt:channelId>UCCSSLRzI7Libw36LYQSdmgg</yt:channelId>
        <title>2023-1-5 教閘</title>
        <link rel="alternate" href="https://www.youtube.com/watch?v=at8lkNACnWA"/>
        <author>
            <name>Macau Jockey Club 澳門賽馬會</name>
            <uri>https://www.youtube.com/channel/UCCSSLRzI7Libw36LYQSdmgg</uri>
        </author>
        <published>2023-01-05T04:32:22+00:00</published>
        <updated>2023-01-05T04:32:56.238967766+00:00</updated>
    </entry>
</feed>
元小池元小池
<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<feed xmlns:yt="http://www.youtube.com/xml/schemas/2015" xmlns="http://www.w3.org/2005/Atom">
    <link rel="hub" href="https://pubsubhubbub.appspot.com"/>
    <link rel="self" href="https://www.youtube.com/xml/feeds/videos.xml?channel_id=UCCSSLRzI7Libw36LYQSdmgg"/>
    <title>YouTube video feed</title>
    <updated>2023-01-07T09:16:15.980945222+00:00</updated>
    <entry>
        <id>yt:video:vKOJ-SBh-9k</id>
        <yt:videoId>vKOJ-SBh-9k</yt:videoId>
        <yt:channelId>UCCSSLRzI7Libw36LYQSdmgg</yt:channelId>
        <title>2023-01-07 Race 5(0102) - THE PRAIA GRANDE (Div 2)</title>
        <link rel="alternate" href="https://www.youtube.com/watch?v=vKOJ-SBh-9k"/>
        <author>\n   
            <name>Macau Jockey Club 澳門賽馬會</name>\n   
            <uri>https://www.youtube.com/channel/UCCSSLRzI7Libw36LYQSdmgg</uri>
        </author>\n  <published>2023-01-07T09:16:01+00:00</published>
        <updated>2023-01-07T09:16:15.980945222+00:00</updated>
    </entry>
</feed>
元小池元小池

2023-01-07T19:21:58.257+09:00

<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n
<feed xmlns:yt="http://www.youtube.com/xml/schemas/2015" xmlns="http://www.w3.org/2005/Atom">
    <link rel="hub" href="https://pubsubhubbub.appspot.com"/>
    <link rel="self" href="https://www.youtube.com/xml/feeds/videos.xml?channel_id=UCCSSLRzI7Libw36LYQSdmgg"/>
    <title>YouTube video feed</title><updated>2023-01-07T09:21:54.514859892+00:00</updated>
    <entry>
        <id>yt:video:dz51kB0NOhg</id>
        <yt:videoId>dz51kB0NOhg</yt:videoId>
        <yt:channelId>UCCSSLRzI7Libw36LYQSdmgg</yt:channelId>
        <title>2023 01 07 race1 AERAS</title>
        <link rel="alternate" href="https://www.youtube.com/watch?v=dz51kB0NOhg"/>
        <author>
            <name>Macau Jockey Club 澳門賽馬會</name>
            <uri>https://www.youtube.com/channel/UCCSSLRzI7Libw36LYQSdmgg</uri>
        </author>
        <published>2023-01-07T09:21:02+00:00</published>
        <updated>2023-01-07T09:21:54.514859892+00:00</updated>
    </entry>
</feed>