ADded libraries for the new stable version.

This commit is contained in:
Manuel Cortez 2015-11-28 10:24:16 -06:00
parent 67412125df
commit f24c0955ce
7 changed files with 17 additions and 5 deletions

View File

@ -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'

View File

@ -5,10 +5,17 @@ import exceptions
from ctypes import c_char_p
from libloader import load_library
import paths
if application.snapshot == True:
if platform.architecture()[0][:2] == "32":
lib = load_library("api_keys32", x86_path=paths.app_path("keys/lib"))
lib = load_library("snapshot_api_keys32", x86_path=paths.app_path("keys/lib"))
else:
lib = load_library("api_keys64", x64_path=paths.app_path("keys/lib"))
lib = load_library("snapshot_api_keys64", x64_path=paths.app_path("keys/lib"))
else:
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

Binary file not shown.

Binary file not shown.

View File

@ -18,6 +18,7 @@
############################################################
import requests
import keys
import application
from twitter import utils
def get_twishort_uri(url):
@ -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"]