chauncyf / Weibo_Carrier

A web crawler that can collect users' post from social media Weibo and output exquisite flyers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weibo Carrier

We don't create weibo, We generate pic from weibo

This program aims to generate delicate pics with your posts or other users' posts you would like to save.

Here are color schemes

light_grey red
pink purple
blue cyan
teal green
orange brown

Here are samples

sample sample
sample sample
sample

























sample

How to use

Default font is NotoSansCJKsc-DemiLight.otf, it's an awesome font provided by Google
You can change layout, color scheme and font at top of the code

    LAYOUT = LAYOUT_ONE
    COLOR_SCHEME = LIGHT_GREY
    FONT = 'NotoSansCJKsc-DemiLight.otf'

This program command cookie to simulate login, thus you have to get you cookie manually

  • Firstly, login at weibo.com
  • Secondly, press F12 to open developer tools, switch to Network tab, then press F5 to refresh page
    (Using Chrome to handle this is a ideal choice)
  • Then, drag the scroll bar to the top and click the first tab, copy 'SUP=xxx;SUB=xxx;' at the right window
  • Last, paste it to 'your cookie' at the top of the code (don't delete the quotation mark)
    HEADER = {'cookie': 'your cookie'}
    URL = ['url']

get_cookie

Caution

For batch carry, input your target users' homepage url like this ['url', 'url2', 'url3']

Some errors may occur when open with console.

Welcome to Fork & Star

Contact me

chauncygrey@foxmail.com

Follow me at Weibo

ChauncyGrey's Weibo

Needs

  • Python 3.5
  • Requests, a HTTP library for human beings.
  • Lxml, a binding for the libxml2 and libxslt libraries.
  • Pillow, The Python Image Library, which provides image processing functionality and supports many file formats.

Python

https://www.python.org/

Extension package installation

Install with pip:

$ pip install requests
$ pip install lxml
$ pip install pillow

About

A web crawler that can collect users' post from social media Weibo and output exquisite flyers.

License:MIT License


Languages

Language:Python 100.0%