Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-reese84
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
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangmingming
lcc-reese84
Commits
038a775a
Commit
038a775a
authored
Dec 01, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
e1595429
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
test_tmx.py
test_tmx.py
+44
-0
No files found.
test_tmx.py
0 → 100644
View file @
038a775a
import
requests
import
tls_client
def
get_header
():
r
=
requests
.
post
(
'http://ymx-lcc.unififi.com/header/borrow'
,
json
=
{
"brush_type"
:
"cookieTR"
,
"brush_fromto"
:
"aaa-bbb"
,
"method"
:
"shopping"
})
return
r
.
json
()
def
return_header
(
header
):
r
=
requests
.
post
(
'http://ymx-lcc.unififi.com/header/return'
,
json
=
{
"brush_type"
:
"cookieTR"
,
"_id"
:
header
[
'brush_id'
],
"status"
:
0
,
})
print
(
r
.
text
)
def
test
():
header
=
get_header
()
headers
=
header
[
'data'
][
'brush_header'
]
brush_proxy
=
header
[
'data'
][
'brush_proxy'
]
session
=
tls_client
.
Session
(
client_identifier
=
'chrome_117'
)
session
.
proxies
=
{
'http'
:
'http://127.0.0.1:7890'
,
'https'
:
'http://127.0.0.1:7890'
,
}
session
.
proxies
=
{
'http'
:
brush_proxy
,
'https'
:
brush_proxy
,
}
print
(
headers
)
url
=
"https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=HKT&ast1=TAO&dd=2023-12-15&rd=null&adt=1&chd=0&inf=0#"
# url = "https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=SIN&ast1=ADL&dst2=ADL&ast2=SIN&dd=2023-12-18&rd=null&adt=1&chd=0&inf=0"
response
=
session
.
get
(
url
,
headers
=
headers
)
print
(
response
.
text
)
return_header
(
header
[
'data'
])
if
__name__
==
'__main__'
:
test
()
\ No newline at end of file
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