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
025e08dc
Commit
025e08dc
authored
Oct 08, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wn test
parent
a4171e1f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
24 deletions
+62
-24
test.py
wn/test.py
+38
-0
wn.py
wn/wn.py
+24
-24
No files found.
wn/test.py
0 → 100644
View file @
025e08dc
This diff is collapsed.
Click to expand it.
wn/wn.py
View file @
025e08dc
...
@@ -156,7 +156,7 @@ while True:
...
@@ -156,7 +156,7 @@ while True:
data
=
{
data
=
{
"originationAirportCode"
:
"LAS"
,
"originationAirportCode"
:
"LAS"
,
"destinationAirportCode"
:
"LAX"
,
"destinationAirportCode"
:
"LAX"
,
"departureDate"
:
"2023-10-0
9
"
,
"departureDate"
:
"2023-10-0
3
"
,
"departureTimeOfDay"
:
"ALL_DAY"
,
"departureTimeOfDay"
:
"ALL_DAY"
,
"returnTimeOfDay"
:
"ALL_DAY"
,
"returnTimeOfDay"
:
"ALL_DAY"
,
"adultPassengersCount"
:
"1"
,
"adultPassengersCount"
:
"1"
,
...
@@ -177,30 +177,30 @@ while True:
...
@@ -177,30 +177,30 @@ while True:
logger
.
info
(
f
'tls:{tlsV} proxy:{proxy} res:: {response.status_code}'
)
logger
.
info
(
f
'tls:{tlsV} proxy:{proxy} res:: {response.status_code}'
)
# total += 1
# total += 1
print
(
response
.
text
)
print
(
response
.
text
)
if
response
.
status_code
!=
403
:
# if response.status_code != 403:
res
=
db
.
env_shape
.
update_one
(
# res = db.env_shape.update_one(
{
'_id'
:
ObjectId
(
selectId
)},
# {'_id': ObjectId(selectId)},
{
"$inc"
:
{
"success"
:
1
}}
# {"$inc": {"success": 1}}
)
# )
# proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={
# # proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={
# 'type':'headerB6'
# # 'type':'headerB6'
# # })
# uri = 'http://ymx-lcc.unififi.com/header/add'
# # uri = 'http://52.52.23.116/header/add'
# # proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
# # proxy = 'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:10042'
# # proxy = 'http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
# r = requests.post(uri, json={
# 'brush_fromto': 'LAS-BOS',
# 'brush_fromdate': '2023-05-26',
# 'brush_header': headers,
# 'brush_proxy': proxy,
# 'brush_mode': 'shopping',
# 'brush_name': 'ts1',
# 'brush_type': 'headerB6',
# })
# })
uri
=
'http://ymx-lcc.unififi.com/header/add'
# success += 1
# uri = 'http://52.52.23.116/header/add'
# logger.success(f'添加成功 {success}')
# proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
# proxy = 'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:10042'
# proxy = 'http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
r
=
requests
.
post
(
uri
,
json
=
{
'brush_fromto'
:
'LAS-BOS'
,
'brush_fromdate'
:
'2023-05-26'
,
'brush_header'
:
headers
,
'brush_proxy'
:
proxy
,
'brush_mode'
:
'shopping'
,
'brush_name'
:
'ts1'
,
'brush_type'
:
'headerB6'
,
})
success
+=
1
logger
.
success
(
f
'添加成功 {success}'
)
# time.sleep(3)
# time.sleep(3)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
)
print
(
e
)
...
...
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