Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use easy language to parse the address of bilibili's live broadcast room to get the content of the on-screen comment

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about how to use easy language to parse the address of bilibili's live broadcast room to get the content of the on-screen comment. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Constant data table

. Version 2

. Constant constant 1, ",

. Constant constant 3, ", http://i0.hdslb.com

. Constant constant 4, ", .jpg

Custom data type table

. Version 2. Data type data. Member uid, text type. Member name, text type. Member text, text type

The code obtained from the on-screen comment of bilibili's studio.

This function requires loading Fine easy Module 5.6

. Version 2. Support library internet. Assembly window assembly _ startup window. The assembly variable result1, text type. The assembly variable result2, text type. Assembly variables data, data. Assembly variable a, integer. Assembly variable count, integer type. Subroutine _ _ startup window _ created a = 1. Subroutine _ clock 1 _ cycle event. Local variable address, text type. Local variable anchor name, text type. Local variable VJ avatar, text-type result1 = encode _ usc2 to ansi (to text (webpage _ visit ("http://api.live.bilibili.com/ajax/msg", 1," roomid= "+ studio code edit box. (content) '23058 = studio roomid. If (result2 ≠ result1) result2 = result1. If true (a = 1) a = 2 returns (). If result1 = text _ take out intermediate text (result1, "text" + # quotation marks + ":" + # quotation marks, # quotation marks + "admin" + # quotation marks + ": []}}") count = text _ occurrence times (result1, "text" + # quotation marks + ":" + # quotation marks). The first (count,) result1 = text _ take out the intermediate text (result1 + # quotation marks + "admin" + # quotation marks + ": []}", "text" + # quotation marks + ":" + # quotation marks + ": []}") result1 = "text" + # quotation marks + ":" + result1. Count loop tail () data.uid = text _ take out intermediate text (result1, "uid" + # quotation marks + ":", "+ # quotation marks) data.name = text take out intermediate text (result1," nickname "+ # quotation marks +": "+ # quotation marks, # quotation marks +", "+ # quotation marks) data.text = text _ take out intermediate text (result1 "text" + # quotation marks + ":", # quotation marks + "," + # quotes) on-screen comment edit box. Content = on-screen comment edit box. Content + data.name + ":" + data.text + # newline character address = encode _ utf8 to gb2312 (to text (HTTP read file ("http://live.bilibili.com/" + studio code edit box. (content)) VJ name = text _ take out intermediate text (address, # constant 1, # constant 2) VJ avatar = text _ take out intermediate text (address, # constant 3, # constant 4) label 1. Title = "Anchor:" + Anchor name profile picture box. Image = HTTP read file (# constant 3 + VJ avatar + ".jpg")'is currently unstable and may not be available in other LVB ~ _ startup window. Title = "currently you are watching the live screen comment of" + VJ name + "- on-screen comment Assistant. If it really ends. The subroutine _ bind button _ is clicked on the studio code edit box. Disable = true message box ("√ bound successfully", 0, "on-screen comment Assistant"). Subroutine _ unbind button _ is clicked in the studio code edit box. Forbidden = false message box ("unbound √", 0, "on-screen comment Assistant")

Running result:

Thank you for reading! This is the end of the article on "how to use easy language to parse the address of bilibili's live room to get on-screen comments". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report