Skip to content

Commit

Permalink
- added page parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Trampenau, Rene committed Aug 22, 2018
1 parent 4e23309 commit 91d6ac1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from bs4 import BeautifulSoup
import urllib2

#quote_page = 'http://www.google.de'
quote_page = 'https://www.uhrzeit123.de/'
page = urllib2.urlopen(quote_page)

soup = BeautifulSoup(page, 'html.parser')

#print soup.prettify().encode('utf-8')
#for finding in soup.find_all('a'):
# print finding.text#.encode('utf-8')

#print str(soup.find('time_hour')) + ":" + str(soup.find('time_min')) + ":" + str(soup.find('time_sec'))

hour = soup.find("span", {"class" : "time_hour"}).text
minute = soup.find("span", {"class" : "time_min"}).text
second = soup.find("span", {"class" : "time_sec"}).text

print "Aktuelle Zeit: " + hour + ":" + minute + ":" + second

0 comments on commit 91d6ac1

Please sign in to comment.