<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: James</title>
    <description>The latest articles on DEV Community by James (@james_gaffa).</description>
    <link>https://dev.to/james_gaffa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3907609%2F2ec27de5-bd41-4f14-8303-2466132cf069.JPG</url>
      <title>DEV Community: James</title>
      <link>https://dev.to/james_gaffa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/james_gaffa"/>
    <language>en</language>
    <item>
      <title>Gaffa @ Major League Hacking's Global Hack Week</title>
      <dc:creator>James</dc:creator>
      <pubDate>Fri, 01 May 2026 13:47:03 +0000</pubDate>
      <link>https://dev.to/james_gaffa/gaffa-major-league-hackings-global-hack-week-m9b</link>
      <guid>https://dev.to/james_gaffa/gaffa-major-league-hackings-global-hack-week-m9b</guid>
      <description>&lt;p&gt;&lt;strong&gt;Every month, &lt;a href="https://mlh.io/" rel="noopener noreferrer"&gt;Major League Hacking (MLH)&lt;/a&gt; hosts a &lt;a href="https://ghw.mlh.io/" rel="noopener noreferrer"&gt;Global Hack Week&lt;/a&gt;, a free event where developers can learn new skills, build their portfolios, and connect with other hackers. MLH is the world’s largest developer community with over 5M software creators living throughout 100+ countries. Every year, MLH hosts 1000+  events online and in-person where community members come together to learn, build, and share the latest and greatest technology.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We were invited to present at Global Hack Week Cloud, where I ran a live session introducing &lt;a href="https://gaffa.dev?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mlh-ghw" rel="noopener noreferrer"&gt;Gaffa&lt;/a&gt; and how it makes building with web data significantly easier. Below are the key moments from the session.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/SMICXc-78a8"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  ▶️ &lt;a href="https://www.youtube.com/live/SMICXc-78a8?si=mexOM9Ep7YtkDylS&amp;amp;t=830" rel="noopener noreferrer"&gt;What is web scraping and why does it matter?&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;I opened the session by covering the fundamentals of web scraping, the practice of extracting data from websites that don't offer an API. The internet is the world's largest database, but most of it isn't neatly packaged for developers, and scraping is getting harder every year. Modern JavaScript frameworks mean pages often don't include their data in the initial HTML response, and many sites actively detect and block automated requests. Tools like Playwright, Selenium, and BeautifulSoup have long been the go-to stack, but they require significant setup, maintenance, and infrastructure to run reliably at scale.&lt;/p&gt;

&lt;p&gt;We also touched on the legal question that arises whenever scraping is discussed. Scraping publicly accessible data is generally accepted and widely used across industries, from price comparison to financial data feeds to AI training sets. The areas to avoid are personal data, content behind a login, and anything that puts undue load on a site, particularly smaller, nonprofit ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  ▶️ &lt;a href="https://www.youtube.com/live/SMICXc-78a8?si=qW7avTw2HV9XJIM0&amp;amp;t=1776" rel="noopener noreferrer"&gt;Introducing Gaffa and the API playground&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcudl9pru5p94mcez121d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcudl9pru5p94mcez121d.png" alt="James explains why to use Gaffa over building your own scraper" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The session then moved into a walkthrough of &lt;a href="https://gaffa.dev?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mlh-ghw" rel="noopener noreferrer"&gt;Gaffa&lt;/a&gt; itself. Gaffa is a web browser automation API. You send a POST request with a URL and a list of actions, and Gaffa executes them in a real, hosted browser and returns the result. No infrastructure to manage, no proxies to configure, no bot detection to fight.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://gaffa.dev/dashboard/playground?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mlh-ghw" rel="noopener noreferrer"&gt;API Playground&lt;/a&gt; is the best place to get started. It lets you build and test browser requests interactively, with built-in examples covering common scenarios. During the session, I walked through a live form-filling example, including enabling request recording so you can see exactly what the browser did.&lt;/p&gt;

&lt;h2&gt;
  
  
  ▶️ &lt;a href="https://www.youtube.com/live/SMICXc-78a8?si=WD65TSWxHbbp7QVu&amp;amp;t=2317" rel="noopener noreferrer"&gt;Demo: Scraping a webpage and asking questions with AI&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqx3390xt7ldlw4zee4dv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqx3390xt7ldlw4zee4dv.png" alt="James demos scraping a Wikipedia page with AI" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first full demo showed how to scrape a Wikipedia article and use it as context for an OpenAI Q&amp;amp;A session. The workflow is straightforward: use Gaffa's &lt;a href="https://gaffa.dev/docs/features/browser-requests/actions/generate-markdown?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mlh-ghw" rel="noopener noreferrer"&gt;&lt;em&gt;generate_markdown&lt;/em&gt;&lt;/a&gt; action to strip a page down to clean, LLM-ready text, then pass that markdown to the model with a question.&lt;/p&gt;

&lt;p&gt;The key insight here is that markdown is a much more efficient way to feed web content into a language model than raw HTML. It removes noise while preserving the page's structure and meaning. The demo showed the model correctly answering questions about the article content and, importantly, telling us when an answer wasn't present, a behavior we prompted for explicitly.&lt;/p&gt;

&lt;p&gt;The full example is available in the &lt;a href="https://github.com/GaffaAI/GaffaPythonExamples/blob/main/talks/MLH_Global_Hack_Week/webpage_to_markdown_and_qa.ipynb" rel="noopener noreferrer"&gt;Gaffa Python Examples GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  ▶️ &lt;a href="https://www.youtube.com/live/SMICXc-78a8?si=RMobTJ20od-Ksh4K&amp;amp;t=2728" rel="noopener noreferrer"&gt;Demo: Extracting structured data with &lt;em&gt;parse_json&lt;/em&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0q75r1fw3hyhmgtvbmkj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0q75r1fw3hyhmgtvbmkj.png" alt="James demonstrates structured data extraction with parse_json" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The second demo is where things get particularly powerful. Rather than asking free-form questions, &lt;a href="https://gaffa.dev/docs/features/browser-requests/actions/parse-json?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mlh-ghw" rel="noopener noreferrer"&gt;&lt;em&gt;parse_json&lt;/em&gt;&lt;/a&gt; lets you define a data schema and have Gaffa use an AI model to extract exactly the fields you need from any page, regardless of its structure.&lt;/p&gt;

&lt;p&gt;In the session, I used the Python Wikipedia page as an example, extracting the title, creator, release year, summary, and key features. The schema is defined as a JSON object with named fields, types, and per-field descriptions that act as mini-prompts to guide the model.&lt;/p&gt;

&lt;p&gt;One practical detail that came up with a real client: you can use field descriptions to enforce a specific output format, for example, specifying that a country field should return a two-letter ISO Alpha-2 code rather than whatever format appears on the page. The model handles the mapping automatically.&lt;/p&gt;

&lt;p&gt;The same action also works on online PDFs. I demonstrated this against a hosted academic paper, extracting the title, abstract, author names, and institutional affiliations, the kind of data that varies in layout across every paper you'd encounter, making it almost impossible to extract reliably with traditional selectors. The result was a clean JSON object ready to insert directly into a database.&lt;/p&gt;

&lt;p&gt;Both examples are available in the &lt;a href="https://github.com/GaffaAI/GaffaPythonExamples/blob/main/talks/MLH_Global_Hack_Week/structured_data_extraction_with_parse_json.ipynb" rel="noopener noreferrer"&gt;Gaffa Python Examples GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  ▶️ &lt;a href="https://www.youtube.com/live/SMICXc-78a8?si=Y7Ix85DucmUDmvpM&amp;amp;t=3462" rel="noopener noreferrer"&gt;The MLH challenges&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdijtxdjh8iqnbrjb2scn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdijtxdjh8iqnbrjb2scn.png" alt="James outlines the Gaffa MLH challenges" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As part of Global Hack Week, we put together a set of Gaffa challenges for attendees:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign up for a Gaffa account and redeem the MLH credit code for $20 of free credits&lt;/li&gt;
&lt;li&gt;Send your first request in the API Playground&lt;/li&gt;
&lt;li&gt;Use a browser request to subscribe to our newsletter via the &lt;a href="https://demo.gaffa.dev/mlh/challenge?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mlh-ghw" rel="noopener noreferrer"&gt;Gaffa demo site&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Extract the title, summary, and author from a Gaffa blog post using &lt;em&gt;parse_json&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're working through these and run into any issues, reach out via support, and we'll help you get unstuck.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Had a great experience with Gaffa! It was my first time doing browser automation, and sending that first API request to print an HTML page to PDF felt like magic. The step-by-step challenges made a complex topic really approachable.&lt;br&gt;
— A Global Hack Week participant&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A huge thank you to the MLH team, particularly Rosendo, for hosting the opportunity to present to their community. It was a genuinely great audience, full of thoughtful questions about scraping legality, dynamic sites, speed, and cost. If you were in the session or are just now finding this post, thanks for watching and reading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you want to try everything covered in the session, &lt;a href="https://gaffa.dev?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mlh-ghw" rel="noopener noreferrer"&gt;sign up for a free Gaffa account&lt;/a&gt; and head to the API Playground to make your first request. The demo site, Python examples, and documentation are all there waiting for you.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>hackathon</category>
      <category>data</category>
      <category>automation</category>
      <category>playwright</category>
    </item>
  </channel>
</rss>
