Skip to content

fix(utils): keep published and export Google Sheets URLs in downloadListOfUrls - #4353

Closed
SwastikTripathi wants to merge 1 commit into
apify:masterfrom
SwastikTripathi:fix/download-list-published-google-sheets
Closed

SwastikTripathi wants to merge 1 commit into
apify:masterfrom
SwastikTripathi:fix/download-list-published-google-sheets

Conversation

@SwastikTripathi

@SwastikTripathi SwastikTripathi commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

downloadListOfUrls rewrites any https://docs.google.com/spreadsheets/d/<id>... URL to <id>/gviz/tq?tqx=out:csv, so a sharing link downloads as CSV. The regex also matched links that were already downloadable:

  • A sheet published to the web, https://docs.google.com/spreadsheets/d/e/2PACX-.../pub?output=csv, took e as the id and became https://docs.google.com/spreadsheets/d/e/gviz/tq?tqx=out:csv, which Google answers with a 404.
  • A link that already points at an export lost its parameters: .../gviz/tq?tqx=out:csv&sheet=Second and .../export?format=csv&gid=123 both became the plain export of the first sheet.

The rewrite now skips /d/e/ links and links whose path continues with /gviz or /export. Sharing links (/edit?usp=sharing, or the bare /d/<id>) are rewritten as before.

Three tests in extract-urls.test.ts check the URL passed to the HTTP client; the published and export cases fail without the change. I also fetched the rewritten /d/e/gviz/tq?tqx=out:csv URL to confirm the 404.

Written with Claude Code (AI). I ran the tests and the request above.

@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 5, 2026
@janbuchar
janbuchar requested a review from barjin November 5, 2026 09:29
barjin added a commit that referenced this pull request Nov 10, 2026
…rls` (#4377)

The rewrite moved to `Actor.getInput()` in the Apify SDK
(apify/apify-sdk-js#859).

Closes #4353
@barjin

barjin commented Nov 10, 2026

Copy link
Copy Markdown
Member

Closed by #4377

@barjin barjin closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants