def list_files(self, *largs):
print('display thread')
self.ids.grid.clear_widgets()
# self.ids.spinner.active = True
url = 'http://ahmedpartey.com/sermons/'
try:
r = requests.get(url)
thread.start_new_thread(self.go, ('name',))
except requests.exceptions.ConnectionError:
# print('cant connect')
# self.ids.spinner.active = False
self.login_failure('Connection Error')
# Snackbar.make('Connection Error, Try Again')
else:
url = 'http://ahmedpartey.com/sermons/'
d = requests.get(url)
o = d.text
dom = Html().feed(o)
for ind in dom.find('a'):
if ind.text()[-4:] == '.mp3':
self.passed.append(str(ind.text()))
self.ids.spinner.active = False
# print(self.passed)
for track in self.passed:
src = 'http://ahmedpartey.com/sermons/{}'.format(track)
# print(src)
self.links.append(src)
self.album = AudioButton(text=str(track))
self.album.add_widget(Photo(source='./assets/tower.png'))
self.ids.grid.add_widget(self.album)
self.ids.spinner.active = False
# print(self.links)
评论列表
文章目录