Skip to main content

a package for search data from weibo, zhihu, guba and etc.

Project description

EuclidSearchPackage

this package is include some tools to get data from weibo、zhihu、guba and etc.

The project will continue to be updated and you are welcome to join us on GitHub.

How to use

1、install this package

pip install EuclidSearchPackage

2、set cookie and import package

import EuclidSearchPackage as ESP
ESP.Set_cookie('cookie.txt')  # 'cookie.txt' is your local cookie file path

3、use WeiboClassV1 to get data

timeBegin = '2023-03-01-0'
timeEnd = '2023-03-10-0'
demoClass = ESP.WeiboClassV1(Mongo=False)
demoClass.main_get(['北师大', '珠海'], timeBegin, timeEnd)

4、use WeiboClassV3 to get data

compare to WeiboClassV2, WeiboClassV3 use thread to get data more fast.

ESP.WeiboClassV3('北师大', Mongo=False, max_work_count=20, LongText=False).main('2023-03-11-00', '2023-03-27-21')

Existing features

you can use these methods to fulfill yours purpose, just like WeiboClassV2

1、 get single weibo's data

data_json = ESP.Get_single_weibo_data(mblogid='MrOtA75Fd')
print(data_json)

2、 get the weibo url list

set the url(contains keyword), then item in list is "1562868034/MkXTBh9Fk", which is contains uid and mblogid

url_list =  ESP.Get_item_url_list('https://s.weibo.com/weibo?q=杭州公园')
print(url_list)

3、get user's info

data_json =  ESP.Get_user_info('1202150843')
print(data_json)

4、get user's all blog

 ESP.Get_user_all_weibo(2656274875, 100, query='主播说联播', colName='主播说联播', csv=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EuclidSearchPackage-0.6.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

EuclidSearchPackage-0.6.1-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file EuclidSearchPackage-0.6.1.tar.gz.

File metadata

  • Download URL: EuclidSearchPackage-0.6.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for EuclidSearchPackage-0.6.1.tar.gz
Algorithm Hash digest
SHA256 adaf09e156cda7171d5d6d619fd2ec1e51253de10e169068c849723e4e31293f
MD5 ef16a7eb6bbd3e966ca8e6fff0d573de
BLAKE2b-256 01d7ec6b231478708b174997525e8a98582cec6d030a3563aac1099ad907c31b

See more details on using hashes here.

File details

Details for the file EuclidSearchPackage-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for EuclidSearchPackage-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73bb1a61a5ffd2efc375dfd8abd420f2ce1b3dd0c9b838898bc4a9d8c6b6f715
MD5 580099db841b3a9d84b84a19e12cb90a
BLAKE2b-256 259754a1ab1e362b36236c60b236ed399f42e5acb950a2375e0c9290dbc86cb3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page