I believe that services like Yahoo! Answers are very useful and use them at times. The Yahoo! Answers community gives an extra point to users each time they visit their account (but only once/day).
The problem is that usually I'm very busy (or lazy) and thus I always forget to visit my account. Therefore I was looking for ways of automating the process. It looks like this is very straightforward to do when the right tools are used. Here's a quick solution using Python:
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
import urllib.request, urllib.parse | |
MAX_TRIES = 3 | |
if __name__ == '__main__': | |
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor()) | |
urllib.request.install_opener(opener) | |
params = urllib.parse.urlencode(dict(login='username@yahoo.com', | |
passwd='y0uRpas5')) | |
utf_params = params.encode('utf-8') | |
login_success = False | |
cur_try = 0 | |
while not login_success and MAX_TRIES != cur_try: | |
try: | |
opener.open('https://login.yahoo.com', utf_params) | |
url = opener.open('http://answers.yahoo.com') | |
content = url.read().decode('utf-8') | |
# print(content) | |
login_success = True | |
except Exception as e: | |
print(e) | |
cur_try += 1 |
Happy coding!