doubanlib-0.1.2
توضیحات
An api tool for DouBan movie
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | doubanlib-0.1.2 |
| نام | doubanlib |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | xhboke |
| ایمیل نویسنده | 2361903575@qq.com |
| آدرس صفحه اصلی | https://github.com/xhboke/douban |
| آدرس اینترنتی | https://pypi.org/project/doubanlib/ |
| مجوز | - |
## Introduce
This is an api tool for [DouBan movie](https://movie.douban.com/),so that you can get the basic information from movies.
## Usage
an example of usage
```
from doubanlib.movies import DouBan
from doubanlib.movies import MovieInfo
# Set the headers
headers = {'User-Agent': 'Hello'}
DouBan.set_headers(headers=headers)
# You can also set the optional proxy
# DouBan.set_proxy(proxy={'http': '203.89.126.250:80'})
# Doctor Strange in the Multiverse of Madness which id is 30304994(https://movie.douban.com/subject/30304994)
obj = MovieInfo(30304994)
# Print the description of the movie
print('Description:{}'.format(obj.description))
```
complete usage
```
# Print all the information of the movie.
print(
'ID:{}\nName:{}\nChinese_Name:{}\nYear:{}\nGenre:{}\nRegions:{}\nLanguage:{}\nRating:{}\nVotes:{}\nLength_Movie:{}\nDirectors:{}\nAlias:{}\nImage:{}\nDate_Published:{}\nActors:{}\nDescription:{}'
.format(obj.m_id, obj.name, obj.chineseName, obj.year, obj.genre,
obj.regions, obj.languages, obj.rating, obj.votes, obj.length_movie,
obj.directors, obj.alias, obj.image, obj.pubDate, obj.actors,
obj.actors, obj.description))
```
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7, <4 | Python |
نحوه نصب
نصب پکیج whl doubanlib-0.1.2:
pip install doubanlib-0.1.2.whl
نصب پکیج tar.gz doubanlib-0.1.2:
pip install doubanlib-0.1.2.tar.gz