https://github.com/agentds/douban-user-spider
Spider for Douban book/movie/music of single user
https://github.com/agentds/douban-user-spider
Last synced: 12 months ago
JSON representation
Spider for Douban book/movie/music of single user
- Host: GitHub
- URL: https://github.com/agentds/douban-user-spider
- Owner: AgentDS
- Created: 2022-04-18T06:48:53.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-18T07:47:59.000Z (about 4 years ago)
- Last Synced: 2025-04-12T17:15:40.013Z (about 1 year ago)
- Language: Python
- Size: 3.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Douban-User-Spider
Spider for Douban book/movie/music of single user.
[toc]
## Environment
__System:__ macOS Big Sur Version 11.4
__Browser:__ Chrome
## Example
Here is an example usage for `movies_single_user.py`
__Steps:__
1. fill in `uid`, `total_num` in `movies_single_user.py`:
```python
uid = "166820507" # TODO: check the user id from DouBan url
total_num = 122 # TODO: total number of movies watched by this user
item_each_page = 15
all_movies = []
```
for this user's movie information:

2. fill in the `header_str` in `movies_single_user.py`, by pasting from browser developer's tool:

copy the whole request header to the `header_str`:

3. run the script:
```bash
cd Douban-User-Spider
# in dir Douban-User-Spider/
python movies_single_user.py
```
4. check the output excel `./movies_166820507.xlsx`:
