Giter Site home page Giter Site logo

crawler's Introduction

Python3 爬虫合集python version

人生苦短, 我用Python!

Contents

Bilibili 豆瓣 优酷 Pixiv
网易云 微博 知乎 百度
微软 其他

Bilibili

  • [Usage]: python danmu.py $url
  • [Example]: python danmu.py https://www.bilibili.com/video/av9933492/

还在进行中...

需要传递的参数及说明如下所示, 由于 tag_id 的可选项太多, 暂时没有考虑

data  = {
	'page':1,			# 第几页
	'page_size':20,		# 每页的数量
	'version':0, 		# 类型: 全部 正片 剧场版 其他 [0 - 4]
	'is_finish':0,		# 状态: 全部 完结 连载 [0 2 1]
	'start_year':0, 	# 时间: 全部 某一年 [0 xxxx]
	'tag_id':'',		# 风格
	'index_type':1,		# 排序方式: 更新时间 追番人数 开播时间 [0 - 2]
	'index_sort':0,		# 排序类型: 递减 递增 [0 - 1]
	'area':0,			# 地区: 全部 日本 美国 其他 [0 2 3 4]
	'quarter':0   		# 季度: 全部 1月 4月 7月 10月 [0 - 4]
}
  • [Usage]: python bangumi_index.py [-t <type> | -a <area> | -e <state> | -m <time> | -s <season> |--tag <style> | --index_type <index_type> | --index_sort <index_sort>]
  • 返回的 Json 文件
bangumi-1
  • list 中一项
bangumi-2

豆瓣

douban

优酷

youku

Pixiv

pixiv首页轮换图

网易云

  • 网易云获取歌曲 APIhttp://music.163.com/song/media/outer/url?id={song_id}.mp3
  • 只需要传入对应歌曲的 song_id 即可

微博

微博亚洲新歌榜

知乎

  • 使用前需要更新问题 id, 填入 Cookie, include 应该不需要更新
  • 返回未验证方式是因为没有给headers传递 X-API-VERSION, X-UDID, authorization 等参数
  • 问题来自知乎一位朋友问我, 因此做的比较粗糙, 没有详细提取数据, 仅将答主提取出来
  • 得到的一些答主 数据

百度

  • [Usage]: python danmu.py $pid
  • [Example]: python getTiebaPics.py 2271504759
  • [Usage]: python3 getBaiduPics.py [Word] [pages = 1]
  • [Example]: python3 getBaiduPics.py 猫 30
  • 注: 图片将保存在关键词的同名目录下。

微软

bing
screenshot

其他

爬取煎蛋网妹子图

  • 问题来自鱼C互助区
  • 代码
    • 此代码并没有加下载图片的函数。因为我之前试过爬微博图片,与其自己写下载函数,倒不如把链接保存下来,全部扔到迅雷来下载,那样速度快多了
  • 有时间改成多线程
  • 有时间将爬取专辑的函数加上
堆糖·古风
慕课网课程

crawler's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.