英文:
Web Scraping - Get information from Twitch.tv
问题
你好,我正在使用Android Studio和Java制作一个安卓应用。
我想要获取一个频道的图片,观众人数,正在直播的游戏,如果可能的话还有聊天内容。
英文:
Hello I am making an application for android with Android Studio and Java.
I want to get a picture of a channel, the number of viewers, the game being streamed, and if possible the chat.
答案1
得分: 0
我建议使用jsoup库。您将能够从网站中提取和操作数据。您可以通过提供HTML属性/元素,然后库将为您解析数据。例如,当您观看Twitch流时,流标题的属性是'stream-title',您可以使用JSOUP获取它。
英文:
I suggest using jsoup library. You will have the ability to extract and manipulate data in a website. You can do this by providing HTML attributes/element and then the library will parse the data for you.
For example, when you are watching a twitch stream, the attribute of the title of the stream is 'stream-title' which you can get using JSOUP.
答案2
得分: 0
我推荐你使用crawler4j,因为它与JAVA和Android相匹配。看一看!https://github.com/yasserg/crawler4j
英文:
I recommend you crawler4j as its matching with JAVA and Android. Have a look! https://github.com/yasserg/crawler4j
专注分享java语言的经验与见解,让所有开发者获益!
评论