Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed Twitter Quote Bot #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

sokuno222
Copy link

@sokuno222 sokuno222 commented Oct 16, 2017

I uploaded everything in time but I forgot to submit a pull request the day of. Sorry!

textList.append(tweet.text)
for text in textList:
if text[0] == 'R':
cleaned = (text.split(':')[1])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this has something to do with the specifics of how the Twitter package/api formats things, but this could use a little documentation I think.

GetTweets.py Outdated



# print (getTweets())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we want to remove commented code and multiple trailing newlines.

Pickling.py Outdated
def PickleBuddy():
files = os.listdir(filePath) # make a list of all the files that already exist
if not "cachedData.pickle" in files:
api = twitter.Api(consumer_key=CONSUMER_KEY,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proper usage, props for that. Though, it might be a little more clear to clarify that these come from TwitterKeys - e.g. TwitterKeys.CONSUMER_KEY.

That's just a style thing though, personal preference and such.

# Returns the contents of the file, split into a list of words and
# (some) punctuation.
def wordlist(words):
# f = open(filename, 'r')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Often it's better to open and close files as-needed, avoiding this kind of commenting /uncommenting while developing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants