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
45905c7f
Commit
45905c7f
authored
Oct 06, 2023
by
wangmingming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
请求造纸
parent
ca0280a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
jetblue.py
b6/src/jetblue.py
+8
-7
No files found.
b6/src/jetblue.py
View file @
45905c7f
...
...
@@ -25,12 +25,12 @@ def md5(text):
client
=
MongoClient
(
'mongodb://lcc-spider:JIUsfhiad&^@18.144.59.80:27017/?authSource=admin&directConnection=true'
)
db
=
client
.
env
# 查询所有文档
if
platform
.
uname
()
.
system
!=
'Darwin'
:
result
=
db
.
env_shape
.
find
({
'env.funcs'
:{
'$ne'
:
None
},
'success'
:
{
'$gte'
:
30
}})
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 platform.uname().system != 'Darwin':
result
=
db
.
env_shape
.
find
({
'env.funcs'
:{
'$ne'
:
None
},
'success'
:
{
'$gte'
:
30
}})
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
())
...
...
@@ -116,7 +116,8 @@ while True:
# # with open('js_dom_run1.js', 'w', encoding='utf-8') as f:
# # f.write(code1 + '\n\n' + c)`
t1
=
time
.
time
()
token
=
list
(
db
.
token_shape
.
aggregate
(
[
{
'$match'
:
{
'update_time'
:{
'$gte'
:
int
(
time
.
time
()
*
1000
)
-
60
*
60
*
12
}}},
{
'$sample'
:
{
'size'
:
1
}
}
]
))[
0
][
'_id'
]
# token = list(db.token_shape.aggregate( [ {'$match': {'update_time':{'$gte': int(time.time() * 1000) - 60*60*12}}}, { '$sample': { 'size': 1 } } ] ))[0]['_id']
token
=
'11'
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json()
# p = subprocess.Popen(['node', 'js_dom_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
...
...
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