Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set IE = CreateObject("internetexplorer.application")
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- on error resume next
- 'Get Pewds subs
- IE.Visible = false
- IE.Navigate "https://www.youtube.com/user/PewDiePie"
- Do While IE.Busy or IE.ReadyState <> 4: WScript.sleep 100: Loop
- Do Until IE.Document.ReadyState = "complete": WScript.sleep 100: Loop
- for each cnt in ie.document.getelementsbytagname("span")
- if instr(cnt.getAttribute("aria-label"),"subscribers") then
- pewds_subs = replace(cnt.innertext,",","")
- end if
- next
- 'Get TSeries subs
- IE.Navigate "https://www.youtube.com/user/tseries"
- Do While IE.Busy or IE.ReadyState <> 4: WScript.sleep 100: Loop
- Do Until IE.Document.ReadyState = "complete": WScript.sleep 100: Loop
- for each cnt in ie.document.getelementsbytagname("span")
- if instr(cnt.getAttribute("aria-label"),"subscribers") then
- tseries_subs = replace(cnt.innertext,",","")
- end if
- next
- ie.quit
- if pewds_subs > tseries_subs then
- winner = "Current Leader: " & vbtab & "PewDiePie!!!"
- else
- winner = "Current Leader: " & vbtab & "T-Series!!!"
- end if
- wscript.echo "Pewds Subs: " & vbtab & pewds_subs & vbcrlf & _
- "T-Series Subs: " & vbtab & tseries_subs & vbcrlf & vbcrlf & _
- "Difference of: " & vbtab & abs(pewds_subs-tseries_subs) & vbcrlf & vbcrlf & winner
- wscript.quit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement