Skip to main content

Mildom(https://www.mildom.com/) crawler written in Python.

Project description

mildom_crawler

This is a Mildom(https://www.mildom.com/) crawler written in Python.

Install

pip install websocket-client
pip install mdcrawler

Example

・Getting user info

from mdcrawler.mildom import Mildom

uid = '10084097'
mildom = Mildom()
user = mildom.get_account_by_uid(uid)
print(user)

# then you get
​```
User info:
Username: TIE Ru
UserId: 10084097
Follower: 197449
Follow: 24
Country: Japan
Level: 97
Exp: 332865
GiftRevenue: 2853554
​```

・Getting playbacks by user_id

from mdcrawler.mildom import Mildom

uid = '10084097'
count = 100
mildom = Mildom()
playbacks = mildom.get_playbacks_by_uid(uid,count=count)
print(len(playbacks))
print(playbacks[0])

# then you get
​```
100

PlayBack info:
PlayBackId: 10084097-c10clv52lrnf4dhgicsg
Username: TIE Ru
UserId: 10084097
PublishTime: 1614859237
Title: 【Apex】渋谷ハルカスタムに渋谷ハルと出る | with prize
ViewNum: 320
Length: 8368110
​```

・Getting chats on the playback

from mdcrawler.mildom import Mildom

pbid = '10105254-1610795759'
count = 100
mildom = Mildom()

chats = mildom.get_chats_by_pbid(pbid,count=count)
print(len(chats))
print(chats[0])

print('-----')

chats = mildom.get_playback_chats_by_pbid(pbid)
print(len(chats))
print(chats[-1])

# then you get
​```
100

Chat info:
ChatId: 1610795770425_10904046_4711
ChatText: こんだよ~
ChatTime: 1610795770
ChatTimeOffset: 10
Username: fusianasan
UserId: 10904046
PlayBackId: 10105254-1610795759

-----
312

Chat info:
ChatId: 1610796391638_10614220_6151
ChatText: なんだろ
ChatTime: 1610796391
ChatTimeOffset: 631
Username: Leimy
UserId: 10614220
PlayBackId: 10105254-1610795759
​```

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

mdcrawler-1.2.1.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file mdcrawler-1.2.1.tar.gz.

File metadata

  • Download URL: mdcrawler-1.2.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.2

File hashes

Hashes for mdcrawler-1.2.1.tar.gz
Algorithm Hash digest
SHA256 ecc314bfb879c5628463d20c86954b78a5a44878fb7ce20ef9e47a453960fab3
MD5 63177eb1758c4fe7c35bd425cf92ed32
BLAKE2b-256 3be676b9d9cd93dc18c2692247c1ee866f03381911bfe55f60847649a211ca97

See more details on using hashes here.

Supported by

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