Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save inclement/6835bd56bb610c0d18f2e298d3588ebc to your computer and use it in GitHub Desktop.
Save inclement/6835bd56bb610c0d18f2e298d3588ebc to your computer and use it in GitHub Desktop.
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()
<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