User:Lidia.Pereira/SDRII/SG

From XPUB & Lens-Based wiki
< User:Lidia.Pereira‎ | SDRII
Revision as of 03:00, 25 January 2014 by Lidia.Pereira (talk | contribs) (Created page with "Following my essay I was quite interested in the idea of how implicit participation makes use of design choices to benefit from user genera...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Following my essay I was quite interested in the idea of how implicit participation makes use of design choices to benefit from user generated content, thus contributing to information management systems which can be exploited for improving information retrieval or gathering user info for market research. In order for this process to be optimized, production of social relations becomes the new paradigm under post-industrialist market rule, for it is communication which ultimately produces economic value. Immaterial labor, then, both satisfies and produces a demand, ultimately forming subjectivity. Inspired by this idea, I'm experimenting with posting my browsing history on social media, which will ultimately start suggesting me people I might "like" to follow, pages I "might" like, subsequentely leading me to browse new links and so on and so forth. The idea is that, at some point, I'll stop having agency, playing the idea of a hetero-generative subjectivity to the extreme.

First successful attempt with Twitter:

import sqlite3, re, time
import urllib2
import bs4
import tweepy


consumer_key="aJiJkOEdd3YKiXVRyfnWDg"
consumer_secret="8TDG4KqBLZPqcvjNFZb7qtJ7brSyqnuTNd1Y9yQrEM"
access_token="2308513993-50VDXIyyKvmITBrGEyvzzVa00v6y3KZoihtf5xs"
access_token_secret="53g8fdSl2URB4SY294XncUgAjGcmojWfRjacc3Hjuk2XD"

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth)
places = sqlite3.connect("places.sqlite")
database = places.cursor()

database.execute('''SELECT url FROM moz_places''')

january = re.compile(r"http://\S+\w")

lista = []

#get the urls
for data in database:
    url = database.fetchone()
    february = str(url)
    march = january.findall(february)
    april = str(march)
    may = april.strip("['']")
    if may != "":
        lista.append(may)


status = open("status.txt").read()

octo = ""

for item in lista:   
    june = urllib2.urlopen(item)
    july = june.read()
    august = BeautifulSoup(july)
    if august.title != None:
        september = august.title.string
        #if september != None:
        october = september.encode("utf-8")
        octo = octo + " " + october
        if october not in status: 
            try: 
                api.update_status(october)
            except tweepy.error.TweepError:
                print "Repetido!"
                print tweepy.error.TweepError
            time.sleep(2)               
    if item  == lista[len(lista)-1]:
        f = open("status.txt","a")
        f.write(octo)