Skip to content

Instantly share code, notes, and snippets.

@ahurriyetoglu
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save ahurriyetoglu/f186e38ab52c4e5a3e5f to your computer and use it in GitHub Desktop.

Select an option

Save ahurriyetoglu/f186e38ab52c4e5a3e5f to your computer and use it in GitHub Desktop.

Revisions

  1. ahurriyetoglu revised this gist Feb 25, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions pyTwiNL.py
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,10 @@
    # 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("http://145.100.57.182/cgi-bin/twitter", data={"NAME":user_name, "PASSWD":passwd})
    r = s.post(urlto_twiqsNL, data={"NAME":user_name, "PASSWD":passwd})
    print('Cookie Created')

    #Twiqs.nl parameters;
    @@ -13,4 +15,4 @@
    #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("http://145.100.57.182/cgi-bin/twitter", params=twiqParam, cookies=s.cookies)
    output1st = requests.get(urlto_twiqsNL, params=twiqParam, cookies=s.cookies)
  2. ahurriyetoglu revised this gist Oct 5, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions pyTwiNL.py
    Original file line number Diff line number Diff line change
    @@ -7,10 +7,10 @@
    print('Cookie Created')

    #Twiqs.nl parameters;
    payload = {'SEARCH':'keyterm(s)', 'DATE':'yyyymmddhh-yyyymmddhh', 'DOWNLOAD':True, 'SHOWTWEETS':True}
    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("http://145.100.57.182/cgi-bin/twitter", params=payload, cookies=s.cookies)
    output1st = requests.get("http://145.100.57.182/cgi-bin/twitter", params=twiqParam, cookies=s.cookies)
  3. ahurriyetoglu revised this gist Oct 5, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion pyTwiNL.py
    Original file line number Diff line number Diff line change
    @@ -11,5 +11,6 @@

    #Fetches the tweets from twiqs.nl
    #Warning: The url may need to be updated from time to time!
    #Warning: Until the results become ready, you need to run the same query several times.
    #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("http://145.100.57.182/cgi-bin/twitter", params=payload, cookies=s.cookies)
  4. ahurriyetoglu revised this gist Oct 5, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion pyTwiNL.py
    Original file line number Diff line number Diff line change
    @@ -10,5 +10,6 @@
    payload = {'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: The url may need to be updated from time to time!
    #Warning: Until the results become ready, you need to run the same query several times.
    output1st = requests.get("http://145.100.57.182/cgi-bin/twitter", params=payload, cookies=s.cookies)
  5. ahurriyetoglu renamed this gist Oct 5, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. ahurriyetoglu created this gist Oct 5, 2014.
    14 changes: 14 additions & 0 deletions pyTwiNL
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    # code to connect to twiqs.nl API
    # Current IP address of twiqs.nl is: http://145.100.57.182
    import requests

    s = requests.Session()
    r = s.post("http://145.100.57.182/cgi-bin/twitter", data={"NAME":user_name, "PASSWD":passwd})
    print('Cookie Created')

    #Twiqs.nl parameters;
    payload = {'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!
    output1st = requests.get("http://145.100.57.182/cgi-bin/twitter", params=payload, cookies=s.cookies)