Created
March 3, 2017 01:39
-
-
Save EncodeTheCode/0948165ab42be5a1fc2e63640a00bfe5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HLTV stats fetcher in bytes written by ETC (EncodeTheCode) | |
import urllib.request as u | |
user_agent='Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0.2 Waterfox/49.0.2' | |
headers={'User-Agent':user_agent} | |
req=u.Request('http://www.hltv.org/ranking/teams/',None,headers) | |
response=u.urlopen(req) | |
data=response.read() | |
response.close() | |
with open('content.txt','wb') as f:f.write(data);f.close() | |
if f.closed==1:print("Stream is closed.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment