Fanbox downloader
| Revision | f8beef3db647d7bea12f935d3d4bcb2b52e3e8b4 (tree) |
|---|---|
| Time | 2023-12-10 12:42:47 |
| Author | supercell <stigma@disr...> |
| Commiter | supercell |
Handle default embed_map type
| @@ -465,7 +465,13 @@ def download_article(config, info): | ||
| 465 | 465 | print('<a href="https://fanbox.cc/@{}/posts/{}">{}</a>'.format( |
| 466 | 466 | embed_creator, embed_id, embed_title), file=url_embeds_file) |
| 467 | 467 | else: |
| 468 | - print(embed_map['html'] + '\n', file=url_embeds_file) | |
| 468 | + assert embed_map['type'] == 'default', 'Unknown embed_map type: {}'.format(embed_map['type']) | |
| 469 | + print('<div style="border:1px solid grey">\n', file=url_embeds_file) | |
| 470 | + print('<p>{}</p>\n'.format(embed_map['host']), | |
| 471 | + file=url_embeds_file) | |
| 472 | + print('<p><a href="{}">{}</a></p>\n'.format(embed_map['url'], | |
| 473 | + embed_map['url']), file=url_embeds_file) | |
| 474 | + print('</div>\n', file=url_embeds_file) | |
| 469 | 475 | # Print embedID to content.txt |
| 470 | 476 | print("[embed:{}]".format(embedId), file=content_file) |
| 471 | 477 |