-
Notifications
You must be signed in to change notification settings - Fork 9
/
Euclid_weibo_Test.py
33 lines (25 loc) · 1.05 KB
/
Euclid_weibo_Test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- coding: utf-8 -*-
# @Time : 2023/2/9 13:01
# @Author : Euclid-Jie
# @File : Euclid_weibo_Test.py
from Euclidweibo import *
# 0 、update cookie
# TODO Eucild-Jie add "how to setting selenium" in README.md
# weiboCookie().update_cookie()
# # 1、 get single weibo's reposts data, the data will write to MongoDB
# Get_single_weibo_details(
# "reposts", mblogid="MrOtA75Fd", header=Set_header("cookie.txt"), Mongo=False
# ).main_get()
# # 2、 get single weibo's data
# data_json = Get_single_weibo_data(mblogid="MrOtA75Fd")
# print(data_json)
# # 3、 set the url(contains keyword), then get the weibo url list, item in list is "1562868034/MkXTBh9Fk", which is contains uid and mblogid
# url_list = Get_item_url_list("https://s.weibo.com/weibo?q=杭州公园", proxies=False)
# print(url_list)
# # 4、get user's info
# data_json = Get_user_info('1202150843')
# print(data_json)
# # 5、get user's all blog
# Get_user_all_weibo(7416119836, 1, csv=True, begin=50)
# 6、get user's all blog and pic
Get_user_all_weibo(7416119836, csv=True, pic=True)