美文网首页
狗屁不通文章逻辑

狗屁不通文章逻辑

作者: 月夜星空下 | 来源:发表于2020-01-21 10:22 被阅读0次
    #!/usr/bin/python
    # -*- coding: UTF-8 -*-
    import codecs
    import os,pprint
    import os
    
    import os, re
    import random,readJSON
    data = readJSON.read_JSON("data.json")
    non = data['bosh'] # 代表文章主要废话来源
    
    data = input("请输入关键词:")
    duplication = 1
    article = 0
    content_page_num = int(input("请输入生成文章篇数:"))
    while True:
        if article == content_page_num:
            break
        def traverse(list1):
            global duplication
            pool = list(list1) * duplication
            while True:
                random.shuffle(pool)
                for ele in pool:
                    yield ele
        next_non = traverse(non)
        for x in data:
            tmp = str()
            while (len(tmp) < 60):
                # 分支 = random.randint(1,3)
                tmp += next(next_non)
            tmp = tmp.replace("x", data)
        print(article)
        print(tmp)
        article += 1
    

    相关文章

      网友评论

          本文标题:狗屁不通文章逻辑

          本文链接:https://www.haomeiwen.com/subject/iwxezctx.html