Sam Lavigne - lavigne@nyu.edu
Detournement is the practice of "hijacking" cultural or artistic materials and reusing them to produce new works that both counter and explicate the original intent or ideology of the source material. In this class students will learn how to scrape massive quantities of material from the internet with Python, and then use that material to make satirical, critical and political projects. Each week we will cover a different web scraping technique, with production assignments relating to text, image and video.
- Intro & ground rules
- HTML/CSS basics
- Tags, attributes, classes, ids, css selectors
- Using Chrome/Firefox developer tools
- the DOM: what it is and how to modify it
- Editing a single element
- Editing multiple elements
- Editing subelements
- Project One: Critique three (3) websites by altering their content using Chrome/Firefox developer tools. Save screenshots and post to the class homework wiki.
- Readings:
- opening video
- Screenshot presentations
- Command line basics
- Python basics
- Setting up our environments with pip and virtualenv
- Intro to web scraping with Beautiful Soup
- Readings:
- Project Two - The List (Part 1): Scrape the web, and then create a list with the material you collect.
- Your list should be text only.
- You list should be long
- opening video
More web scraping with Beautiful Soup- Writing to a file
- Dictionaries
- JSON
- writing to json
- scraping from ajax/json
- Fox News search
- Primer on manipulating text with TextBlob
- getting words
- getting parts of speech
- most common phrases
- Project Two - The List (Part 2): Create a physical version of your list: for example, print it on roll paper, make a book, make a website, make a projection, recite it, etc.
- Readings:
- Project #2 due
- Downloading files
- Manipulating images
- wth imagemagick
- with Pillow
- Calling external commands using subprocess.call
- Web scraping with Selenium and puppeteer
- Project Three - Image: Create a system that automatically manipulates images found online.
- Readings:
- Caliban and the Witch (chapter one)
- Automating the online self
AJAX
and how to deal with it
- Project #3 due
- Bots
- Project Four - Make a simple bot
- Scraping and editing video
- Prepare a proposal for your final project.
- Project proposals due
- TBD
- Lab day
- Final presentations
- Each of the four main projects is worth 20% of your grade, and class participation is 20%.
- More than one unexcused absence is grounds for failure :(
- But no one will fail.
- It's OK to show work that has sensitive or difficult content, but if you do so give everyone a quick heads up beforehand.
- We will be critiquing each others work in the class. Be honest but friendly when critiquing other students. When receiving critique please listen and take feedback seriously.
- Feel free to use your laptop in class to take notes or follow along when I'm covering programming topics. Please do not use your laptops to do stuff on social media unrelated to the class etc.
- The only time laptop use is strictly prohibited is when other students are presenting their work.
- Turn off your phones or put them on silent during class.
- No projects about Trump.
- Learn Python The Hard Way by Zed Shaw (not actually hard)