Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chinese-obfs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
chinese-obfs
Commits
6adb2812
There was an error fetching the commit references. Please try again later.
Unverified
Commit
6adb2812
authored
5 years ago
by
meng ke
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into master
parents
28cb8c0b
2507c63c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
自动狗屁不通文章生成器.py
+40
-21
40 additions, 21 deletions
自动狗屁不通文章生成器.py
with
40 additions
and
21 deletions
自动狗屁不通文章生成器.py
+
40
−
21
View file @
6adb2812
...
...
@@ -3,16 +3,33 @@
import
os
,
re
import
random
,
readJSON
data
=
readJSON
.
读JSON文件
(
"
data.json
"
)
名人名言
=
data
[
"
famous
"
]
前面垫话
=
data
[
"
before
"
]
后面垫话
=
data
[
'
after
'
]
废话
=
data
[
'
bosh
'
]
xx
=
data
[
'
title
'
]
名人名言
=
data
[
"
famous
"
]
# a 代表前面垫话,b代表后面垫话
前面垫话
=
data
[
"
before
"
]
# 在名人名言前面弄点废话
后面垫话
=
data
[
'
after
'
]
# 在名人名言后面弄点废话
废话
=
data
[
'
bosh
'
]
# 代表文章主要废话来源
xx
=
"
学生会退会
"
重复度
=
2
def
洗牌遍历
(
列表
):
global
重复度
池
=
list
(
列表
)
*
重复度
while
True
:
random
.
shuffle
(
池
)
for
元素
in
池
:
yield
元素
下一句废话
=
洗牌遍历
(
废话
)
下一句名人名言
=
洗牌遍历
(
名人名言
)
def
来点名人名言
():
xx
=
名人名言
[
random
.
randint
(
0
,
len
(
名人名言
)
-
1
)]
xx
=
xx
.
replace
(
"
a
"
,
前面垫话
[
random
.
randint
(
0
,
len
(
前面垫话
)
-
1
)]
)
xx
=
xx
.
replace
(
"
b
"
,
后面垫话
[
random
.
randint
(
0
,
len
(
后面垫话
)
-
1
)]
)
global
下一句名人名言
xx
=
next
(
下一句名人名言
)
xx
=
xx
.
replace
(
"
a
"
,
random
.
choice
(
前面垫话
)
)
xx
=
xx
.
replace
(
"
b
"
,
random
.
choice
(
后面垫话
)
)
return
xx
def
另起一段
():
...
...
@@ -21,16 +38,17 @@ def 另起一段():
xx
+=
"
"
return
xx
for
x
in
xx
:
tmp
=
str
()
while
(
len
(
tmp
)
<
6000
)
:
分支
=
random
.
randint
(
0
,
100
)
if
分支
<
5
:
tmp
+=
另起一段
()
elif
分支
<
20
:
tmp
+=
来点名人名言
()
else
:
tmp
+=
废话
[
random
.
randint
(
0
,
len
(
废话
)
-
1
)]
tmp
=
tmp
.
replace
(
"
x
"
,
xx
)
print
(
tmp
)
if
__name__
==
"
__main__
"
:
xx
=
input
(
"
请输入文章主题:
"
)
for
x
in
xx
:
tmp
=
str
()
while
(
len
(
tmp
)
<
6000
)
:
分支
=
random
.
randint
(
0
,
100
)
if
分支
<
5
:
tmp
+=
另起一段
()
elif
分支
<
20
:
tmp
+=
来点名人名言
()
else
:
tmp
+=
next
(
下一句废话
)
tmp
=
tmp
.
replace
(
"
x
"
,
xx
)
print
(
tmp
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment