Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Need help using twython with a proxy! ( Python )

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
linxuser808
Posts: 23
Joined: 2016-10-14 06:26

Need help using twython with a proxy! ( Python )

#1 Post by linxuser808 »

How do i assign the "lol" parameter to twython.setup? Please help!!!!!!!

Code: Select all

#!/usr/bin/env python
import sys
import os
from twython import Twython, TwythonError

proxyobj = { 
    "username": "tighenon"
    "password": "awc9l5ol5t"
    "host": "104.167.237.44"
    "port": "21308"
}

lol = twython.setup("username", "password", proxy = proxyobj) 

CONSUMER_KEY = lAv7gZvgJhMMXQeuiOCnNR8qM
CONSUMER_SECRET = ZdIpjZMp9A9fbzvHuiDqGjd2tyJMu6peiVO0vDOl7XvptkHHhd
ACCESS_KEY = 720720437852803072-K0MRDQ8XSF5p5v7zz2b4wOrpQCnp0If
ACCESS_SECRET = PCaS6CLcpfUkFAzlH5cTluRXmQF85dLOy6pY0m5e0L1gJ

api = Twython(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_KEY,ACCESS_SECRET)

cmd = '/opt/vc/bin/vcgencmd measure_temp'
line = os.popen(cmd).readline().strip()
temp = line.split('=')[1].split("'")[0]
api.update_status(status='My current CPU temperature is '+temp+' C')

https://github.com/ryanmcgrath/twython/ ... 2e2b04115c

Post Reply