~/talk

Web Scraping with Beautiful Soup

Talkat PyData DC 2018 · on Friday, 2018-11-16· [python, web-platform]
slides:none on file

Extracts IMDB pages using Beautiful Soup with requests + lxml and builds a reusable function that takes an IMDB ID and returns a dictionary of metadata. Implements json.loads to pull contentRating from an embedded JSON blob, parses title and summary from HTML, iterates to collect actor and director names, and demonstrates timing differences between parsers. Checks robots.txt, recommends pacing requests to avoid blocking, and delivers a working movie_dict function that successfully scrapes multiple IMDB pages.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Robots.txt rules
  3. 2:37Developer tools for HTML
  4. 4:01Installing dependencies
  5. 6:20Setting up project
  6. 7:45Importing Beautiful Soup
  7. 10:21LXML vs HTML parser
  8. 14:02Extracting movie title
  9. 17:22Finding elements by tag
  10. 18:49Inspecting elements
  11. 19:11Extracting movie description
  12. 20:56Hidden JSON ratings
  13. 27:55Processing JSON data
  14. 28:17Extracting actors from JSON
  15. 33:16Looping actors names
  16. 34:25Exercise: Scraping directors
  17. 34:47Reusable scraping functions
  18. 41:12Movie dictionary function
  19. 45:05Testing new movie
  20. 47:30Exercise: Scrape any IMDB movie
  21. 49:37Beautiful Soup vs Scrapy
  22. 51:08Why scraping is valuable
  23. 51:55DataFrame conversion
  24. 54:06Controlling crawl rate
  25. 54:52Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.