Created
May 27, 2019 13:35
-
-
Save inclement/6835bd56bb610c0d18f2e298d3588ebc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
url = "https://genius.com/Joyner-lucas-isis-lyrics" | |
def news(): | |
global lyrics | |
page = urlopen(Request(url, headers={'User-Agent': 'Mozilla'})) | |
soup = BeautifulSoup(page, "html.parser") | |
lyrics = soup.p.text.strip() | |
news() | |
class MyFloatLayout(FloatLayout): | |
lyrics_text = StringProperty(lyrics) | |
def btn(self): | |
news() | |
print(lyrics) | |
class MyApp(App): | |
def build(self): | |
Window.clearcolor = (.13, .13, .13, 1) | |
return MyFloatLayout() | |
if __name__ == "__main__": | |
MyApp().run() |
This file contains hidden or 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
<Button>: | |
font_size: 40 | |
color: 0.1,0.5,0.6,1 | |
size_hint: 0.3, 0.1 | |
<MyFloatLayout>: | |
Label: | |
pos_hint:{"top":1} | |
text: root.lyrics_text | |
Button: | |
pos_hint:{"bottom":1} | |
text: "RE-SEARCH" | |
font_size: 10 | |
on_press: root.btn() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment