Skip to content

fix(examples,quickstarts): replace broken sample media URLs - #1662

Open
dsugurtuna wants to merge 2 commits into
google-gemini:mainfrom
dsugurtuna:fix/broken-sample-media-urls
Open

dsugurtuna wants to merge 2 commits into
google-gemini:mainfrom
dsugurtuna:fix/broken-sample-media-urls

Conversation

@dsugurtuna

Copy link
Copy Markdown

Replaces three failing (HTTP 400 / 403) third-party sample media URLs with verified working URLs across active cookbook examples and quickstarts:

  • quickstarts/rest/Video_REST.ipynb (cell 11): wget https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4 now fails with HTTP 403 (cf-mitigated: challenge). Switched to the cookbook's official GCS mirror https://storage.googleapis.com/generativeai-downloads/videos/Big_Buck_Bunny.mp4 (-O BigBuckBunny_320x180.mp4), returning HTTP 200 (video/mp4, exact same 64657027 bytes) while preserving VIDEO_PATH="./BigBuckBunny_320x180.mp4".
  • quickstarts-js/Image_out.js (line 844): 1374px-Lunch_atop_a_Skyscraper_-_Charles_Clyde_Ebbets.jpg returns HTTP 400 from Wikimedia; updated to standard Wikimedia step 1280px-... (HTTP 200, 1280x1006 JPEG).
  • examples/Opossum_search.ipynb (cell 10 & saved outputs): 292px-Opossum_2.jpg returns HTTP 400 from Wikimedia; updated to standard Wikimedia step 330px-Opossum_2.jpg (HTTP 200, 330x271 JPEG) and cleared stale outputs referencing 292px-Opossum_2.jpg.

Verification

  • python3 tools/nbfmt_cli.py --test quickstarts/rest/Video_REST.ipynb examples/Opossum_search.ipynb ([TEST PASSED])
  • python3 tools/nblint_cli.py --repo=google-gemini/cookbook --branch=main quickstarts/rest/Video_REST.ipynb examples/Opossum_search.ipynb (0 failed)
  • python3 tools/check_all_links.py quickstarts/rest/Video_REST.ipynb examples/Opossum_search.ipynb ([SUCCESS] All links are healthy and valid!)
  • node --check quickstarts-js/Image_out.js (exit 0)
  • Verified HTTP 200 and decoded media payload/dimensions for all three replacement URLs.

@review-notebook-app

Copy link
Copy Markdown

Review Notebooks

Notebooks changed:

Review visual diffs and comment on any notebook cell. All comments sync back to this PR.


Powered by ReviewNB

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses broken external media dependencies in the cookbook's documentation and examples. By replacing inaccessible URLs with reliable GCS mirrors and updated Wikimedia paths, the changes ensure that users can successfully run the provided quickstarts and examples without encountering network errors. Stale notebook outputs were also removed to maintain repository cleanliness.

Highlights

  • Broken URL Remediation: Replaced three failing third-party media URLs (returning HTTP 400/403) with stable, verified alternatives across cookbook examples and quickstarts.
  • Notebook Cleanup: Updated examples/Opossum_search.ipynb and quickstarts/rest/Video_REST.ipynb by clearing stale execution outputs and updating source code to reflect the new media assets.
  • Verification: Confirmed all replacement URLs return HTTP 200 and validated the changes using the repository's link checking and linting tools.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions github-actions Bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder component:quickstarts Issues/PR referencing quickstarts folder labels Dec 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates image and video URLs across several files, including switching the video download source in quickstarts/rest/Video_REST.ipynb to a GCS mirror. However, the changes also clear the execution outputs in both examples/Opossum_search.ipynb and quickstarts/rest/Video_REST.ipynb. The review feedback requests that these notebooks be run and saved with their outputs populated, rather than cleared, to align with the repository's style guide.

"output_type": "display_data"
}
],
"outputs": [],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository style guide, we want the outputs to be saved in the notebooks so that readers can see what the code does without running it. Instead of clearing the outputs completely, please run the notebook to regenerate and save the updated outputs with the new opossum image URL.

References
  1. Ideally we want the outputs to be saved in the notebooks so that one can see what the code does without running it. (link)

Comment thread quickstarts/rest/Video_REST.ipynb Outdated
]
}
],
"outputs": [],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository style guide, we prefer to keep outputs saved in the notebooks so that readers can see the execution results. Instead of clearing the output of the download cell, please run the notebook to regenerate and save the updated output showing the successful download from the GCS mirror.

References
  1. Ideally we want the outputs to be saved in the notebooks so that one can see what the code does without running it. (link)

@dsugurtuna

Copy link
Copy Markdown
Author

Thanks for the review! I populated quickstarts/rest/Video_REST.ipynb cell 11 with the executed wget output from the GCS mirror (64657027 bytes saved) and re-verified nbfmt_cli, nblint_cli, and check_all_links.

For examples/Opossum_search.ipynb cells 12 and 15, regenerating the full Gemini model outputs requires a live GEMINI_API_KEY, so I cleared only those two cells rather than keeping stale saved outputs that still embedded the broken 292px-Opossum_2.jpg URL or fabricated model HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:examples Issues/PR referencing examples folder component:quickstarts Issues/PR referencing quickstarts folder status:awaiting review PR awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant