Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-shape
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wangmingming
lcc-shape
Commits
8f6de3cc
Commit
8f6de3cc
authored
Jan 14, 2024
by
wangmingming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
00472c9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
main.py
wnsrc/src/main.py
+8
-6
No files found.
wnsrc/src/main.py
View file @
8f6de3cc
...
...
@@ -3,6 +3,7 @@ import random
import
re
import
subprocess
import
time
from
pathlib
import
Path
import
loguru
import
requests
...
...
@@ -132,11 +133,12 @@ def md5(text):
client
=
MongoClient
(
'mongodb://lcc-spider:JIUsfhiad&^@18.144.59.80:27017/?authSource=admin&directConnection=true'
)
db
=
client
.
env
# 查询所有文档
result
=
db
.
env_shape
.
find
({
'env.funcs'
:{
'$ne'
:
None
}})
data
=
{
str
(
x
[
'_id'
]):
x
[
'env'
]
for
x
in
result
}
print
(
result
)
with
open
(
'env.json'
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
write
(
json
.
dumps
(
data
))
if
not
Path
(
'env.json'
)
.
exists
():
result
=
db
.
env_shape
.
find
({
'env.funcs'
:{
'$ne'
:
None
}})
data
=
{
str
(
x
[
'_id'
]):
x
[
'env'
]
for
x
in
result
}
print
(
result
)
with
open
(
'env.json'
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
write
(
json
.
dumps
(
data
))
with
open
(
'env.json'
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
data
=
json
.
loads
(
f
.
read
())
envs
=
data
.
keys
()
...
...
@@ -175,7 +177,7 @@ while True:
# continue
logger
.
debug
(
'开始刷值'
)
lastHash
=
''
usedTime
=
1
0
usedTime
=
2
0
code
=
open
(
'src.js'
,
'r'
,
encoding
=
'utf-8'
)
.
read
()
for
i
in
range
(
30
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment