Commit ccf4ea2b authored by Alexander Beck's avatar Alexander Beck
Browse files

funktioniert

parent 85340913
import requests
from bs4 import BeautifulSoup
import lxml
source= requests.get('https://www.hs-augsburg.de/Geistes-und-Naturwissenschaften/Soziale-Arbeit.html').text
soup=BeautifulSoup(source, 'lxml')
suche=soup.find('<p><a class="multiline hyphenate" href="../Geistes-und-Naturwissenschaften.html"> Geistes- und Naturwissenschaften </a></p>')
x=suche.p.a.text
print(x)
\ No newline at end of file
def kurs(URL):
source= requests.get(URL)
soup=BeautifulSoup(source.text, 'html.parser')
suche=soup.find('body').find(class_='Fw(b) Fz(36px) Mb(-4px) D(ib)')
#print(suche.text.strip())
return suche.text.strip()
def pkurs(URL):
print(kurs(URL))
print("Yahoo! Finance URL: ")
URL=input()
pkurs(URL)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment