Created
July 23, 2020 09:35
-
-
Save fuwiak/47368f55a0966dfe427035f5b289edb0 to your computer and use it in GitHub Desktop.
This file contains 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
import random | |
import traceback | |
import urllib.request | |
import re | |
import requests | |
import time | |
from PIL import Image | |
from bs4 import BeautifulSoup | |
import urllib.request | |
url = f'https://fast.com/' | |
response = (urllib.request.urlopen(url)).read() | |
soup = BeautifulSoup(response, "html.parser") | |
time.sleep(3) | |
# date = re.search('<div class="speed-results-container succeeded" id="speed-value">"(.+)"></div>', str(soup)) | |
mydivs = soup.findAll("div", {"class": "speed-results-container"}) | |
#id | |
print("Name of id", mydivs[0].get("id")) | |
print('Value of id= ', mydivs[0].text.strip()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment