Git Product home page Git Product logo

renren_photos_crawler's Introduction

renren_photos_crawler

人人相册爬虫,只爬取公开相册(不公开的我也没法儿访问呀)

前提

首先要成功登录你的人人账号,获得cookie!! 首先要成功登录你的人人账号,获得cookie!!

测试环境

  • OSX Yosemite 10.10.4
  • Python 2.7.9

依赖库

  • lxml
  • requests

可以通过一下命令安装

$ pip install lxml requests

配置文件

config.ini

  • [cookie]
    你的人人网cookie

登录你得人人,在renren.com域下打开chrome的console,输入以下命令:

document.cookie

按下回车,即可得到你在renren的cookie

范例:

cookie = a=1; b=2; c=3

a=1; b=2; c=3就是你使用document.cookie得到的cookie

  • [dir]
    你要将你的相册存储在哪里

范例:

start_dir = '/home/work/me/'
  • [person]
    你想下载的相册的人的"人人ID"和"姓名" 在start_dir下会建一个以“姓名”命名得文件夹,存储他的所有相册 "人人ID"是该人在人人网得账号,就像你的QQ号一样,比如我得人人网首页是 http://www.renren.com/353077725/profile, 我得人人ID就是353077725

范例:

123456 = 呵呵

使用方法

  • 按以上方法安装Python及依赖得Python库
  • 下载该代代码
  • 修改config.ini
  • 使用python renren_photos_crawler.py命令运行,即可下载相册

renren_photos_crawler's People

Contributors

pein0119 avatar

Watchers

Tang,Jiezhe 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.