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
4220e565
Commit
4220e565
authored
Sep 11, 2024
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws 测试
parent
ad5ba47d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
main.py
ws/src/main.py
+13
-13
No files found.
ws/src/main.py
View file @
4220e565
...
...
@@ -244,7 +244,7 @@ while True:
selectId
=
random
.
choice
(
list
(
envs
))
# selectId = '197d94c3099d110aef4e0a52'
if
usedTime
>
0
:
if
usedTime
>
3
:
# c = session.get('https://www.westjet.com/assets/app/scripts/swa-common.js').text
# response = session.post('http://52.52.23.116/tls/forward',
# json=dict(url='https://www.westjet.com/resources/js/wj_common.js', headers=headers, method="GET", proxy=proxy, debug=True
...
...
@@ -264,18 +264,18 @@ while True:
logger
.
debug
(
'js变化'
)
js_uri
=
re
.
findall
(
'(https://www
\
.westjet
\
.com/resources/.+?)"'
,
c1
)[
0
]
if
run_js_cache
!=
js_uri
:
logger
.
info
(
f
'get {js_uri}'
)
run_js_cache
=
js_uri
# response = requests.post('http://52.52.23.116/tls/forward',
# json=dict(url=js_uri,
# headers=headers, method="GET", proxy=proxy, debug=True
# , allow_redirects=True, random_tls=True
# ))
# c2 = response.json()['text']
response
=
session
.
get
(
url
=
js_uri
,
headers
=
headers
)
c2
=
response
.
text
run_js_code
=
c2
#
if run_js_cache != js_uri:
logger
.
info
(
f
'get {js_uri}'
)
run_js_cache
=
js_uri
# response = requests.post('http://52.52.23.116/tls/forward',
# json=dict(url=js_uri,
# headers=headers, method="GET", proxy=proxy, debug=True
# , allow_redirects=True, random_tls=True
# ))
# c2 = response.json()['text']
response
=
session
.
get
(
url
=
js_uri
,
headers
=
headers
)
c2
=
response
.
text
run_js_code
=
c2
code
=
open
(
'src2.js'
,
'r'
,
encoding
=
'utf-8'
)
.
read
()
with
open
(
'src_run3.js'
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
write
(
code
+
'
\n\n
'
+
';;'
+
c1
+
';;;
\n\n
;;;'
+
run_js_code
...
...
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