All Projects → xhboke → douban

xhboke / douban

Licence: MIT, Unknown licenses found Licenses found MIT LICENSE Unknown LICENSE.txt
基于thinkphp5.1的豆瓣电影API

Programming Languages

PHP
23972 projects - #3 most used programming language
Smarty
1635 projects
PLpgSQL
1095 projects

Labels

Projects that are alternatives of or similar to douban

Douban Movie
豆瓣电影爬虫
Stars: ✭ 181 (+70.75%)
Mutual labels:  douban
PickTrue
豆瓣相册下载, A站下载器,Artstation Downloader, Pixiv Downloader, 花瓣网(huaban.com)图片下载器
Stars: ✭ 129 (+21.7%)
Mutual labels:  douban
goSpider
some small project and some articles
Stars: ✭ 56 (-47.17%)
Mutual labels:  douban
Weapp Mark
🔥 豆瓣类影视查询记录小程序,附学习笔记
Stars: ✭ 187 (+76.42%)
Mutual labels:  douban
Douban
React-native 仿豆瓣电影 app
Stars: ✭ 236 (+122.64%)
Mutual labels:  douban
computer book list
一个综合了豆瓣,goodreads综合评分的计算机书籍书单
Stars: ✭ 1,535 (+1348.11%)
Mutual labels:  douban
Wxapp Douban Api Movie
Douban movie api data completed a WeChat applet wxAPP, very suitable as a small program beginners combat project!
Stars: ✭ 161 (+51.89%)
Mutual labels:  douban
doubanrobot
A simple robot for Douban.com
Stars: ✭ 34 (-67.92%)
Mutual labels:  douban
Doubanbook
竹简——最全中文ISBN信息查询接口
Stars: ✭ 234 (+120.75%)
Mutual labels:  douban
where-is-douban250
🐛 一个爬虫程序,整理了腾讯视频、爱奇艺、优酷、哔哩哔哩等视频网站中,能够观看的「豆瓣电影 Top250 榜单」影片。
Stars: ✭ 123 (+16.04%)
Mutual labels:  douban
Laosj
golang light-weight image crawler
Stars: ✭ 199 (+87.74%)
Mutual labels:  douban
Tofu
一款 Chrome 扩展。用于备份豆瓣账号的数据,并支持导出 Excel 文档。
Stars: ✭ 228 (+115.09%)
Mutual labels:  douban
douban group spy
豆瓣小组爬虫
Stars: ✭ 53 (-50%)
Mutual labels:  douban
Videospider
抓取豆瓣,bilibili等中的电视剧、电影、动漫演员等信息
Stars: ✭ 186 (+75.47%)
Mutual labels:  douban
psm
Pypi Source Manager: fast switch between different Pypi Source: Pypi, double, aliyun
Stars: ✭ 31 (-70.75%)
Mutual labels:  douban
Douban2piratebay
在豆瓣电影页面里添加一个指向海盗湾的链接
Stars: ✭ 162 (+52.83%)
Mutual labels:  douban
DoubanYearProgress
Year progress for Douban
Stars: ✭ 59 (-44.34%)
Mutual labels:  douban
ToolsCollection
No description or website provided.
Stars: ✭ 20 (-81.13%)
Mutual labels:  douban
doubanIMDb
IMDb + Rotten Tomatoes + Wikipedia on Douban Movie
Stars: ✭ 93 (-12.26%)
Mutual labels:  douban
douban-openapi-server
A Douban API server that provides an unofficial APIs for media information gathering
Stars: ✭ 56 (-47.17%)
Mutual labels:  douban

GitHub

安装说明

  • Python
pip install doubanlib
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))

# 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))
  • PHP 本地测试

下载代码

git clone https://github.com/xhboke/douban.git

启动服务

php think run

然后就可以在浏览器中访问

http://localhost:8000
  • PHP 服务器

上传代码,设置 public 为运行目录,设置伪静态

location / {
	if (!-e $request_filename){
		rewrite  ^(.*)$  /index.php?s=$1  last;   break;
	}
}

同时关闭调试模式 /config/app.php : 'app_debug' => true ==> 'app_debug' => false

注意

频繁使用会导致封禁IP,目前可通过更换IP或者使用代理或者是登录获取Cookie的方式避免。

使用方法

上方为豆瓣的链接,下方是API的链接,大致相同,涉及页数的有变化,最后请不要加上‘/’

一、电影信息

电影基本信息

https://movie.douban.com/subject/25845392/

http://127.0.0.1:8000/subject/25845392

电影短评

https://movie.douban.com/subject/25845392/comments?status=P

http://127.0.0.1:8000/subject/25845392/comments?page=0&sort=new_score

电影短评

https://movie.douban.com/subject/25845392/reviews?&start=0&sort=hotest

http://127.0.0.1:8000/subject/25845392/reviews?page=0&sort=hotest

电影参演人员

https://movie.douban.com/subject/25845392/celebrities

http://127.0.0.1:8000/subject/25845392/celebrities

影片图片

https://movie.douban.com/subject/25845392/all_photos

http://127.0.0.1:8000/subject/25845392/all_photos

影片图片

https://movie.douban.com/subject/25845392/photos?type=S

http://127.0.0.1:8000/subject/25845392/photos?type=S

二、影片搜索

关键词

http://127.0.0.1:8000/search/key/长津湖

搜索影片

https://search.douban.com/movie/subject_search?search_text=长&cat=1002&start=0

http://127.0.0.1:8000/search/长/0

三、分类影片

分类影片

http://127.0.0.1:8000/tag?tags=电影,剧情,中国大陆,2021&page=0&sort=U

四、人物信息

人物基本信息

https://movie.douban.com/celebrity/1023040

http://127.0.0.1:8000/celebrity/1023040

人物图片

https://movie.douban.com/celebrity/1023040/photos/?type=C&start=0&sortby=like&size=a&subtype=a

http://127.0.0.1:8000/celebrity/1023040/photos?page=0&sort=like

单张图片

https://movie.douban.com/celebrity/1023040/photo/1247932516

http://127.0.0.1:8000/celebrity/1023040/photo/1247932516

人物获奖

https://movie.douban.com/celebrity/1023040/awards

http://127.0.0.1:8000/celebrity/1023040/awards

人物参演

https://movie.douban.com/celebrity/1023040/movies?start=0&format=pic&sortby=time

http://127.0.0.1:8000/celebrity/1023040/movies?page=0&sort=time

人物合作

https://movie.douban.com/celebrity/1023040/movies?start=0&format=pic&sortby=time

http://127.0.0.1:8000/celebrity/1023040/partners?page=0

五、图片信息

图片基本信息及评论

https://movie.douban.com/photos/photo/2673813691/

http://127.0.0.1:8000/photos/photo/2673813691

六、豆瓣250

https://movie.douban.com/top250?start=25&filter=

http://127.0.0.1:8000/top250?page=0

声明

本项目仅供学习交流,禁止用于非法用途。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].