summaryrefslogtreecommitdiff
path: root/jfr_playoff/remote.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-21 15:52:11 +0100
committeremkael <emkael@tlen.pl>2018-02-21 15:52:11 +0100
commitc69cade1b7dcecfbdb45a2da59bafa6f1a0bf7ea (patch)
tree43e8b2e00fb505eaaa8821df490fce8f3b4687f0 /jfr_playoff/remote.py
parentccc54fde2f8c9301962e9c6f464d5f2eacd5506a (diff)
Migrating from urllib to requestsv1.1.0
Diffstat (limited to 'jfr_playoff/remote.py')
-rw-r--r--jfr_playoff/remote.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/jfr_playoff/remote.py b/jfr_playoff/remote.py
index b6d0a34..f02a8d4 100644
--- a/jfr_playoff/remote.py
+++ b/jfr_playoff/remote.py
@@ -1,4 +1,4 @@
-import urllib
+import requests
from bs4 import BeautifulSoup as bs
@@ -9,5 +9,5 @@ class RemoteUrl:
@classmethod
def fetch(cls, url):
if url not in cls.url_cache:
- cls.url_cache[url] = urllib.urlopen(url).read()
+ cls.url_cache[url] = requests.get(url).text
return bs(cls.url_cache[url], 'lxml')