2016-11-02 3 views
-2

나는 웹 사이트에서 번호를 가져 와서 그 번호를 실시간으로 업데이트하려고 노력해 왔습니다. 나는 성공하지 못했다.웹 사이트에서 번호 받기

#include <GUIConstantsEx.au3> 
#include <StaticConstants.au3> 
#include <WindowsConstants.au3> 
#Region ### START Koda GUI section ### Form= 
$Form1 = GUICreate("Form1", 290, 113, 633, 260) 
$Subscribercount = GUICtrlCreateLabel("0", 64, 56, 15, 29) 
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif") 
$text = GUICtrlCreateLabel("PewDiePie Subscriber Count", 80, 24, 140, 17) 
GUISetState(@SW_SHOW) 
#EndRegion ### END Koda GUI section ### 

While 1 
    $nMsg = GUIGetMsg() 
    Switch $nMsg 
     Case $GUI_EVENT_CLOSE 
      Exit 

    EndSwitch 
WEnd 

우리는이 웹 사이트 수를 얻을 수 : https://livecounts.net/channel/pewdiepie

지금, 사람이 나를 도와주세요 수 있습니까? 나는 그것을 정말로 appriciate 할 것이다!

답변

0

YouTube에서 구독자 수를 늘리지 않는 이유는 무엇입니까? 이렇게하면 시작할 수 있습니다.

#include <String.au3> 
#include <GUIConstantsEx.au3> 
#include <WindowsConstants.au3> 
HotKeySet("{ESC}", "quit") 

GUICreate("PewDiePie Subscriber Count", 300, 50, -1, -1) 
$data = GUICtrlCreateLabel("", 10, 10, 380, 50) 
GUICtrlSetFont(-1, 18, 575, 0, "MS Sans Serif") 
GUICtrlSetColor(-1, 0xFF0000) 
GUISetState() 

While 1 
    Sleep(2000) 
    gethits() 
WEnd 

Func gethits() 
    $Source = BinaryToString(InetRead('https://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw', 1)) 
    $hits = _StringBetween($Source, 'subscribed yt-uix-tooltip" title="', '" tabindex="') 
    For $a In $hits 
     GUICtrlSetData($data, $a) 
    Next 
EndFunc ;==>gethits 

Func quit() 
    Exit 
EndFunc ;==>quit