You are browsing as a guest. Sign up (or log in) to start making projects!

D-Pod

@D-Pod

Joined July 3rd, 2026

  • 13Devlogs
  • 1Projects
  • 1Ships
  • 3Votes
Ship Pending review

this project was supposed to be a scraper for AMC Theatres’ website to layout movie showtimes in a calendar UI.

however, after finishing the theatre lookup functionality, I kind of forgot about this project until Terra came around (another hack club event). I got to work on this project again, and started building a frontend and linking it to the backend. When I linked it to the backend, I found that amctheatres.com installed anti-bot security measures which I could not bypass. so essentially I had to rewrite the whole backend using amctheatres.com’s sitemap instead of using the code I had already built. If not for this, I would have completed the scraping element as well and made a complete project.

this is my first time making a project with a full backend and frontend, api calls, and first time using javascript.

  • 13 devlogs
  • 34h
Try project → See source code →
Open comments for this post

8h 1m 2s logged

pivoting scraping approach

I was not able to find a way to send requests to the amc’s endpoint, since they tightened security so now I’m going to use their sitemap instead

0
0
7
Open comments for this post

5h 17m 14s logged

shipped project for week 1 of terra, backend broke

good news and bad news and more bad news:

  • I was able to link the frontend to the actual query-calling backend
  • However, AMC Theatres recently changed security on their website, so now they want cloudflare-issued cookies, which I can’t get with just the requests library. solution: use playwright, an actual headless browser which will be able to get the cookies and fetch data. however, i’ve never worked with async functions before so this will be a challenge. at least i got the frontend to render the 403 error with color coding 😊
  • remember how i said “more bad news”? well when I was deploying this project on vercel, the backend broke for some reason. the frontend can call the backend, but the backend can’t find the ../frontend library, yet it’s hosting it. a;laksjdf;lkja;lksdf. imma have to figure this out now.
2
0
32
Open comments for this post

4h 34m 2s logged

frontend prototype working

I made a simple frontend, connected it to the backend, and made a batch file to launch the whole thing.

0
0
8
Open comments for this post

2h 6m 17s logged

project file restructuring finished

finished file restructuring of theater lookup functionality, updated dependencies, added comments to query_handler.py for readability

next step:

either start working on a frontend for what I have so far, or finish the rest of the backend

0
0
13
Open comments for this post

2h 22m 16s logged

we’re back - project restructuring

Apart from opening the project from time to time and promptly forgetting about it, I started thinking about project structure and moved the query handler class into a separate python file. i also entered this project into Terra, so we’re also tracking time there now.

0
0
44
Open comments for this post

4h 40m 42s logged

GraphQL Handler Class Finished (Recap)

A quick recap of what my project structure will be like, and what GraphQL does, since I don’t think I stated that too clearly…


How This Should Theoretically Work:

This is a web scraper that gets movie showtimes over different days from https://amctheatres.com/ and renders them as a calendar. But before you can even get the showtimes, you need the theater to get showtimes from (duh). Thankfully, I don’t have to rebuild this from scratch since I found AMC’s graphQL endpoint and their query for fetching theater locations by search term. (If I didn’t find this I would have likely given up on the project.)

Since the query is already pretty much built for me, I can recreate a theater lookup modal, similar to AMC’s, so the user can choose a nearby theater. Using the theater’s backend information returned in the query,
I can then construct a URL for that theater’s showtimes page, then scrape it.

Currently I’m just making the backend, I’ll move to the UI after I’m finished with making the backend components.

My Query Handler

So I decided to make the query handling process object-oriented because I didn’t want a bunch of variables holding long strings laying around. Before I explain how the query handler works, I need to explain how the query itself works (I’ll make this quick I promise).

Query Structure

It basically takes a search query (search term) and looks up matching locations. It returns a list of locations (which can be cities or theaters), the length of which is indicated by a resultCount parameter, with each location also returning a list of theaters around it. The search query and result count are given in a separate variables json. The query structure basically looks like this (simplified version):

query QueryName($query: String, $resultCount: Int = 10) {
  locations(query: $query, first: $resultCount) {
    [here you put in attributes you want returned. ex:]
    title
    latitude
    longitude
    
    theatres { [this is you requesting each location's theatres and their info]
      [here is where you put the THEATRES' attributes you want. ex:]
      name
      theatreId
      city
      
      attributes(type: FILTERS, first: 4) { [and this is if you want the list of theatres' features, like available formats, type of seating, etc.]
        name [just asking for the attributes' names]
      }
    }
  }
}

The Query Handler

As you can see, all of this is incredibly painful. So I made a class that will take lists of attributes you want (location_fields, theatre_fields, attributes_fields) and construct a query, also with a method to send a request with a search term. All of this is shown in the video.

Where to next?

Now it’s time to build the url constructor and web scraper 😩 wish me luck guys

0
0
9
Open comments for this post

1h 13m 18s logged

GraphQL pain

I started researching GraphQL and JSON because I haven’t done much of either in the past. I snooped around in the AMC queries some more to try and make a query of my own, also trying to figure out how I’m going to structure theater lookup in the user experience. this is hard

0
0
6
Open comments for this post

55m logged

endpoint day

after snooping around in the “network” tab of Inspect I found AMC’s graphQL endpoint. after a bit of pain and not knowing how graphQL works, I finally was able to reproduce the request and get it to give me output. this is so that I can hopefully recreate AMC’s “select a theatre” UI from scratch, instead of having the user put in their theatre.

help

0
0
5
Open comments for this post

1h 3m 42s logged

I set up Poetry for python package and env management (including Jupyter notebooks) and started experimenting with fetching AMC’s showtime pages. Here’s what I found:

  1. You can’t request a showtimes page by itself. It will ask for a theater location.
  2. After peeking around in dev tools on the showtimes page, I found that it actually sends a request to the server with a theater set in the url!
  3. There is also a page on AMC to view showtimes for ALL movies, which I could theoretically use later to create a calendar for any movie, instead of just for one specific movie’s showtimes.
    Still much work to do, but I’m getting there! 👍
0
0
2

Followers

Loading…