This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
from tkinter.filedialog import * | |
filename = None | |
# create new file | |
def newFile(): | |
global filename | |
filename = "Just Write" | |
text.delete(0.0, END) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import csv | |
# request web source to get source code | |
source = requests.get('insert your url here').text | |
# assign a var for parsed information w standard BS syntax | |
soup = BeautifulSoup(source, 'lxml') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this is a template for you to write a csv file | |
import csv | |
# create a file to open | |
# 'w' = write mode | |
# new line = blank | |
with open('name your csv file', 'w', newline = '') as fp: | |
# create var | |
a = csv.writer(fp, delimiter = ',') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tweepy | |
import csv | |
from urlextract import URLExtract | |
from textblob import TextBlob | |
# log in via codes provided by Twitter | |
consumer_key = 'enter your consumer key' | |
consumer_secret = 'enter your consumer secret key' | |
access_token = 'enter your access token' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tweepy | |
# log in via codes provided by Twitter | |
consumer_key = 'enter your consumer key' | |
consumer_secret = 'enter your consumer secret' | |
access_token = 'enter your access token' | |
access_token_secret = 'enter your access token secret' | |
# this is for authentication by using OAuthHandler and set_access_token method |