Created
January 20, 2018 18:46
-
-
Save hybridjosto/7e44f43a43849842d3cc4a69addfd15b 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 urllib3 | |
from bs4 import BeautifulSoup | |
from dateutil import parser | |
my_date = '26/05/2016' | |
dt = parser.parse(my_date) | |
url_to_scrape = "http://www.analogman.com/kotdelay.htm" | |
http = urllib3.PoolManager() | |
r = http.request('GET', url_to_scrape) | |
soup = BeautifulSoup(r.data,"html.parser") | |
ps = soup.find_all('b') | |
for p in ps: | |
x = parser.parse(p.string) | |
print dt - x | |
print dt, x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment