Last active
August 29, 2015 14:07
-
-
Save ahurriyetoglu/f186e38ab52c4e5a3e5f to your computer and use it in GitHub Desktop.
This python code provides easy access to twiqs.nl API. Information about twiqs.nl can be found at http://ifarm.nl/erikt/twinl/
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
# code to connect to twiqs.nl API | |
# Current IP address of twiqs.nl is: http://145.100.57.182 | |
import requests | |
urlto_twiqsNL = "http://145.100.57.222/cgi-bin/twitter" | |
s = requests.Session() | |
r = s.post(urlto_twiqsNL, data={"NAME":user_name, "PASSWD":passwd}) | |
print('Cookie Created') | |
#Twiqs.nl parameters; | |
twiqParam = {'SEARCH':'keyterm(s)', 'DATE':'yyyymmddhh-yyyymmddhh', 'DOWNLOAD':True, 'SHOWTWEETS':True} | |
#Fetches the tweets from twiqs.nl | |
#Warning: The url may need to be updated from time to time! | |
#Warning: Until the results are ready, you need to run the same query several times. | |
# If the query period is long, it may take several hours. | |
output1st = requests.get(urlto_twiqsNL, params=twiqParam, cookies=s.cookies) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment