#!/usr/bin/python
import os, sys
sys.path.append("/Users/RWalport/Desktop/Rob_CS/PLT/plt")
import trowelfunctions as tfl
def gettweets(of,person,searching,twitter):
	if not tfl.checktype(['text', 'text', 'text', 'text'],list(reversed(locals().values()))): return 'gettweets is used improperly'
	prefix = 'https://twitter.com/'
	twitterurl = tfl.r_combine([prefix,'and',person])
	results = tfl.r_findtext(['in',twitterurl])
	return results
tweets = gettweets('of','barackobama','searching','twitter')
tfl.r_print([tweets])
#!/usr/bin/python
import os, sys
sys.path.append("/Users/RWalport/Desktop/Rob_CS/PLT/plt")
import trowelfunctions as tfl
stories = ['http://www.bbc.co.uk/news/business-21857393','http://www.bbc.co.uk/news/uk-northern-ireland-21855357']
filteredresult = ""
term1 = 'obama'
term2 = 'ireland'
filteredresult = tfl.r_findurl(['in',stories,'with',term1,'and',term2])
tfl.r_print([filteredresult])
Esempio n. 3
0
#!/usr/bin/python
import os, sys

sys.path.append("/Users/RWalport/Desktop/Rob_CS/PLT/plt")
import trowelfunctions as tfl

hellocontents = ""
hello = "http://pythonweb.org/projects/webmodules/doc/0.5.3/html_multipage/web/node20.html"
hellocontents = tfl.r_findtext(["in", hello])
tfl.r_print([hellocontents])