main.py 584 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4 5
from src.ebook.extract_book_code import extract_code
from src.ebook.community import send_topic

if __name__ == "__main__":
    book_mapping = {
ToTensor's avatar
ToTensor 已提交
6
        "前端体验设计——HTML5+CSS3终极修炼": "c4eeb42b07f54b42a9fd1568b8ec4b98",
ToTensor's avatar
ToTensor 已提交
7
    }
ToTensor's avatar
ToTensor 已提交
8 9 10 11 12 13 14 15
    for key in book_mapping.keys():
        extract_code(book_mapping)
        web_url = 'https://gitcode.net/csdn/content/book_id_{}/-/tree/master/'.format(
            book_mapping[key])
        print('-------' * 20)
        print('开始向社区发帖')
        book_dir = 'data/{}/'.format(key)
        # send_topic(web_url, book_dir)