Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-akm
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-akm
Commits
c247aa3b
Commit
c247aa3b
authored
Mar 18, 2023
by
anqi-wmm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产 sensor_data
测试成功
parent
c6258462
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
testnk.go
src/test/testnk.go
+9
-9
No files found.
src/test/testnk.go
View file @
c247aa3b
...
...
@@ -50,10 +50,10 @@ func abckSensor(client tls_client.HttpClient, sensorurl string) string {
req
.
Header
.
Set
(
"referer"
,
"https://www.spirit.com/"
)
req
.
Header
.
Set
(
"user-agent"
,
rsss
[
1
])
resp
,
_
:=
client
.
Do
(
req
)
readBytes
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
fmt
.
Println
(
string
(
readBytes
))
//
readBytes, _ := io.ReadAll(resp.Body)
//
fmt.Println(string(readBytes))
for
_
,
cookie
:=
range
resp
.
Cookies
()
{
fmt
.
Println
(
cookie
.
Name
,
len
(
cookie
.
Value
)
,
cookie
.
Value
)
fmt
.
Println
(
cookie
.
Name
,
len
(
cookie
.
Value
))
}
ua
=
rsss
[
1
]
}
...
...
@@ -62,7 +62,7 @@ func abckSensor(client tls_client.HttpClient, sensorurl string) string {
func
main
()
{
wg
:=
&
sync
.
WaitGroup
{}
for
i
:=
0
;
i
<
1
;
i
++
{
for
i
:=
0
;
i
<
1
0
;
i
++
{
wg
.
Add
(
1
)
go
func
()
{
jar
:=
tls_client
.
NewCookieJar
()
...
...
@@ -80,12 +80,12 @@ func main() {
fmt
.
Println
(
px
)
options
:=
[]
tls_client
.
HttpClientOption
{
tls_client
.
WithTimeoutSeconds
(
30
),
tls_client
.
WithClientProfile
(
tls_client
.
Chrome_1
10
),
tls_client
.
WithClientProfile
(
tls_client
.
Chrome_1
08
),
tls_client
.
WithNotFollowRedirects
(),
tls_client
.
WithCookieJar
(
jar
),
// create cookieJar instance and pass it as argument
tls_client
.
WithProxyUrl
(
"http://127.0.0.1:8890"
),
//
tls_client.WithProxyUrl("http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"),
//
tls_client.WithProxyUrl(px),
//
tls_client.WithProxyUrl("http://127.0.0.1:8890"),
tls_client
.
WithProxyUrl
(
"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"
),
tls_client
.
WithProxyUrl
(
px
),
tls_client
.
WithInsecureSkipVerify
(),
}
client
,
err
:=
tls_client
.
NewHttpClient
(
tls_client
.
NewNoopLogger
(),
options
...
)
...
...
@@ -104,7 +104,7 @@ func main() {
req
.
Header
.
Set
(
"accept-language"
,
"en-US,en;q=0.9"
)
req
.
Header
.
Set
(
"User-Agent"
,
"Mozilla/5.0 (Linux; Android 9; SM-N9500) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36"
)
resp
,
_
:=
client
.
Do
(
req
)
fmt
.
Println
(
resp
.
StatusCode
)
doc
,
err
:=
goquery
.
NewDocumentFromReader
(
resp
.
Body
)
if
err
!=
nil
{
panic
(
err
)
...
...
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