1
Friends,
I’d like to take data from a calendar:
http://www.purebhakti.com/component/panjika
The first step would be to make the program choose the time zone ( -3:00 Buenos Aires) and click on Submit Time Zone.
After clicking on Submit Time Zone, select the city (Rio de Janeiro) and click on Get Calendar.
Only after these steps will I have access to the calendar effectively to think about extracting the information.
I’d like to, uh, catch the event of the day:
For example, today is the 22nd, so print:
22 Apr 2017 : Ekādaśī, K, 06:09, Śatabhiṣā
+ŚUDDHA EKĀDAŚĪ VRATA: FASTING FOR Varūthinī EKADASI
I thought about using Python and beautifulsoap but I accept suggestions.
Question: How to get the program to the calendar (after selecting the time zone and city automatically)?
I couldn’t get out of:
from bs4 import BeautifulSoup
import requests
url = 'http://www.purebhakti.com/component/panjika'
header = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
'AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/51.0.2704.103 Safari/537.36'}
req = requests.get(url,headers= header)
html = req.text
soup = BeautifulSoup(html,'html.parser')
Has some initial code ?
– MagicHat
only this. had forgotten to post
– Ed S
It’s already a start, if Naum can sound "do it for me" you know ? Quia apouco appears a fan of Phyton...
– MagicHat
Sorry, it was my mistake.
– Ed S
I don’t think it’s complex, but I really don’t know! Thanks for the contribution!
– Ed S