Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
crawler
Project
Project
Details
Activity
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
backend
crawler
Commits
6d70266e
Commit
6d70266e
authored
Jan 07, 2021
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5077869e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
crawler_tudou.py
crawler_sys/site_crawler/crawler_tudou.py
+4
-1
crawler_xiaohongshu.py
crawler_sys/site_crawler/crawler_xiaohongshu.py
+8
-0
No files found.
crawler_sys/site_crawler/crawler_tudou.py
View file @
6d70266e
...
...
@@ -957,4 +957,6 @@ if __name__ == '__main__':
# break
#sr_tud = test.search_page(keyword='任正非', search_pages_max=2)
# pass
test
.
get_releaser_page
(
releaser_url
)
# test.get_releaser_page(releaser_url)
res
=
requests
.
get
(
"https://www.baidu.com"
,
proxies
=
{
'http'
:
'http://114.99.116.173:18833/'
,
'https'
:
'http://114.99.116.173:18833/'
})
print
(
res
)
\ No newline at end of file
crawler_sys/site_crawler/crawler_xiaohongshu.py
View file @
6d70266e
...
...
@@ -68,6 +68,14 @@ class Crawler_xiaohongshu():
self
.
chrome_options
.
add_argument
(
'--disable-gpu'
)
self
.
chrome_options
.
add_argument
(
"--no-sandbox"
)
self
.
chrome_options
.
add_argument
(
'User-Agent="Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"'
)
self
.
chrome_options
.
add_argument
(
'accept="text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"'
)
self
.
chrome_options
.
add_argument
(
'accept-encoding="gzip, deflate"'
)
self
.
chrome_options
.
add_argument
(
'accept-language="zh-CN,zh;q=0.9"'
)
self
.
chrome_options
.
add_argument
(
'cache-control="max-age=0"'
)
self
.
chrome_options
.
add_argument
(
'referer="https://www.xiaohongshu.com/explore"'
)
self
.
chrome_options
.
add_argument
(
'sec-fetch-dest="document"'
)
self
.
chrome_options
.
add_argument
(
'sec-fetch-mode="navigate"'
)
self
.
chrome_options
.
add_argument
(
'sec-fetch-user="?1"'
)
self
.
chrome_options
.
add_argument
(
'upgrade-insecure-requests="1"'
)
self
.
chrome_options
.
add_experimental_option
(
'excludeSwitches'
,
[
'enable-automation'
])
...
...
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