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
f9e97ba7
Commit
f9e97ba7
authored
Sep 19, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收集更多信息
parent
9b0abeb8
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
6608 deletions
+84
-6608
jetblue.py
jetblue.py
+60
-60
js_dom_run.js
js_dom_run.js
+20
-3281
src_run.js
src_run.js
+4
-3265
src_run_company_chrome.js
src_run_company_chrome.js
+0
-2
No files found.
jetblue.py
View file @
f9e97ba7
...
@@ -80,7 +80,7 @@ for i in range(100):
...
@@ -80,7 +80,7 @@ for i in range(100):
# selectId = 'a74b38e7115cf4d1b1f6976c'
# selectId = 'a74b38e7115cf4d1b1f6976c'
c
=
session
.
get
(
'https://www.jetblue.com/js/src/jb-74873.js'
,
insecure_skip_verify
=
True
)
.
text
c
=
session
.
get
(
'https://www.jetblue.com/js/src/jb-74873.js'
,
insecure_skip_verify
=
True
)
.
text
m5
=
md5
(
c
)
m5
=
md5
(
c
)
if
m5
!=
lastHash
and
usedTime
>
2
:
if
m5
!=
lastHash
and
usedTime
>
5
:
lastHash
=
m5
lastHash
=
m5
usedTime
=
0
usedTime
=
0
logger
.
debug
(
'js变化'
)
logger
.
debug
(
'js变化'
)
...
@@ -96,7 +96,7 @@ for i in range(100):
...
@@ -96,7 +96,7 @@ for i in range(100):
# p = subprocess.Popen(['node', 'js_dom_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'js_dom_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p
=
subprocess
.
Popen
([
'node'
,
'src_run
1
.js'
,
selectId
,
'11'
],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
p
=
subprocess
.
Popen
([
'node'
,
'src_run.js'
,
selectId
,
'11'
],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stderr
=
subprocess
.
PIPE
)
output
,
err
=
p
.
communicate
(
timeout
=
10
)
output
,
err
=
p
.
communicate
(
timeout
=
10
)
tmp
=
''
tmp
=
''
...
@@ -105,71 +105,71 @@ for i in range(100):
...
@@ -105,71 +105,71 @@ for i in range(100):
else
:
else
:
raise
Exception
(
selectId
)
raise
Exception
(
selectId
)
r
=
json
.
loads
(
tmp
)
r
=
json
.
loads
(
tmp
)
res
=
db
.
env_shape
.
update_one
(
#
res = db.env_shape.update_one(
{
'_id'
:
ObjectId
(
selectId
)},
#
{'_id': ObjectId(selectId)},
{
"$inc"
:
{
"used"
:
1
}}
#
{"$inc": {"used": 1}}
)
#
)
usedTime
+=
1
usedTime
+=
1
headers
.
update
(
r
)
headers
.
update
(
r
)
# headers = r
# headers = r
logger
.
info
(
f
"success:{success} total:{total} {(time.time() - t1) *1000:.3f}ms {len(headers['X-1ItxWO9i-a'.lower()])} {selectId} {headers['user-agent']}"
)
logger
.
info
(
f
"success:{success} total:{total} {(time.time() - t1) *1000:.3f}ms {len(headers['X-1ItxWO9i-a'.lower()])} {selectId} {headers['user-agent']}"
)
# logger.info(f"success:{success} {(time.time() - t1) *1000:.3f}ms {headers['X-1ItxWO9i-a'.lower()]}")
# logger.info(f"success:{success} {(time.time() - t1) *1000:.3f}ms {headers['X-1ItxWO9i-a'.lower()]}")
url
=
"https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
# url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data
=
{
# data = {
"tripType"
:
"oneWay"
,
# "tripType": "oneWay",
"from"
:
"LAS"
,
# "from": "LAS",
"to"
:
"BOS"
,
# "to": "BOS",
"depart"
:
"2023-05-10"
,
# "depart": "2023-05-10",
"cabin"
:
"economy"
,
# "cabin": "economy",
"refundable"
:
False
,
# "refundable": False,
"dates"
:
{
# "dates": {
"before"
:
"3"
,
# "before": "3",
"after"
:
"3"
# "after": "3"
},
# },
"pax"
:
{
# "pax": {
"ADT"
:
1
,
# "ADT": 1,
"CHD"
:
0
,
# "CHD": 0,
"INF"
:
0
,
# "INF": 0,
"UNN"
:
0
# "UNN": 0
},
# },
"redempoint"
:
False
,
# "redempoint": False,
"pointsBreakup"
:
{
# "pointsBreakup": {
"option"
:
""
,
# "option": "",
"value"
:
0
# "value": 0
},
# },
"isMultiCity"
:
False
,
# "isMultiCity": False,
"isDomestic"
:
False
# "isDomestic": False
}
# }
#
# session = requests.Session()
# # session = requests.Session()
#
# response = session.post(url, headers=headers, json=data, insecure_skip_verify=True)
# logger.info(f'tls:{tlsV} proxy:{proxy} res:: {response.status_code}')
# total += 1
# # print(response.text)
# if response.status_code != 403:
# res = db.env_shape.update_one(
# {'_id': ObjectId(selectId)},
# {"$inc": {"success": 1}}
# )
# # proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={
# # 'type':'headerB6'
# # })
response
=
session
.
post
(
url
,
headers
=
headers
,
json
=
data
,
insecure_skip_verify
=
True
)
uri
=
'http://ymx-lcc.unififi.com/header/add'
logger
.
info
(
f
'tls:{tlsV} proxy:{proxy} res:: {response.status_code}'
)
proxy
=
f
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
total
+=
1
r
=
requests
.
post
(
uri
,
json
=
{
# print(response.text)
'brush_fromto'
:
'LAS-BOS'
,
if
response
.
status_code
!=
403
:
'brush_fromdate'
:
'2023-05-26'
,
res
=
db
.
env_shape
.
update_one
(
'brush_header'
:
headers
,
{
'_id'
:
ObjectId
(
selectId
)},
'brush_proxy'
:
proxy
,
{
"$inc"
:
{
"success"
:
1
}}
'brush_mode'
:
'shopping'
,
)
'brush_name'
:
'jsr'
,
# proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={
'brush_type'
:
'headerB6'
,
# 'type':'headerB6'
})
# })
success
+=
1
logger
.
success
(
f
'添加成功 {success}'
)
uri
=
'http://ymx-lcc.unififi.com/header/add'
proxy
=
f
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
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'
:
'jsr'
,
'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
)
js_dom_run.js
View file @
f9e97ba7
This diff is collapsed.
Click to expand it.
src_run.js
View file @
f9e97ba7
This diff is collapsed.
Click to expand it.
src_run_company_chrome.js
View file @
f9e97ba7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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