Skip to content

Commit

Permalink
ADded libraries for the new stable version.
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelcortez committed Nov 28, 2015
1 parent 6741212 commit f24c095
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/application.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
name = 'TWBlue'
snapshot = True
snapshot = False
if snapshot == False:
version = "0.80"
update_url = 'http://twblue.es/updates/twblue_ngen.json'
Expand Down
13 changes: 10 additions & 3 deletions src/keys/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@
from ctypes import c_char_p
from libloader import load_library
import paths
if platform.architecture()[0][:2] == "32":
lib = load_library("api_keys32", x86_path=paths.app_path("keys/lib"))
if application.snapshot == True:
if platform.architecture()[0][:2] == "32":
lib = load_library("snapshot_api_keys32", x86_path=paths.app_path("keys/lib"))
else:
lib = load_library("snapshot_api_keys64", x64_path=paths.app_path("keys/lib"))
else:
lib = load_library("api_keys64", x64_path=paths.app_path("keys/lib"))
if platform.architecture()[0][:2] == "32":
lib = load_library("stable_api_keys32", x86_path=paths.app_path("keys/lib"))
else:
lib = load_library("stable_api_keys64", x64_path=paths.app_path("keys/lib"))

# import linuxKeys
# lib = linuxKeys

Expand Down
File renamed without changes.
File renamed without changes.
Binary file added src/keys/lib/stable_api_keys32.dll
Binary file not shown.
Binary file added src/keys/lib/stable_api_keys64.dll
Binary file not shown.
7 changes: 6 additions & 1 deletion src/long_tweets/twishort.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
############################################################
import requests
import keys
import application
from twitter import utils

def get_twishort_uri(url):
Expand All @@ -41,10 +42,14 @@ def get_full_text(uri):
# return False

def create_tweet(user_token, user_secret, text, media=0):
if application.snapshot == True:
url = "http://twblue.es/snapshot_twishort.php"
else:
url = "http://twblue.es/stable_twishort.php"
data = {"user_token": user_token,
"user_secret": user_secret,
"text": text.encode("utf-8"),
"media": media}
response = requests.post("http://twblue.es/twishort.php", data=data)
response = requests.post(url, data=data)
# print response.json()
return response.json()["text_to_tweet"]

0 comments on commit f24c095

Please sign in to comment.