Created
December 22, 2015 13:29
-
-
Save ihfazhillah/0b5b6c608e155ff94c3d to your computer and use it in GitHub Desktop.
Menampilkan tanggalan hijriyah hari ini di android menggunakan android helper requests dan beautifulsoup library
This file contains 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
from beautifulsoup import BeautifulSoup | |
from androidhelper import Android | |
import requests | |
def hijri_now(): | |
resp = requests.get("http://beta.islamicfinder.org") | |
soup = BeautifulSoup(resp.content) | |
date_html = soup.find("div", {"class" : "date-box2"}) | |
return date_html.text.strip() | |
if __name__ == "__main__": | |
droid = Android() | |
droid.dialogCreateAlert(title="Tanggal Hijriah", | |
message = hijri_now() ) | |
droid.dialogSetPositiveButtonText("Done") | |
droid.dialogShow() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment