diff --git a/webroot/watch.shs b/webroot/watch.shs
index f17f147..f7a45d6 100755
--- a/webroot/watch.shs
+++ b/webroot/watch.shs
@@ -158,7 +158,15 @@ if [[ "${get_data[v]}" ]]; then
fi
strings[description]=$(jq -r '.description' <<< "$video" | sed -E 's/$/
/g')
- vid="$(cat "temp/${get_data[v]}_https_-_"*"watch"*".dump")"
+ # youtube-dl modifies the filename when writing with --write-pages
+ # params restricted=True, is_id=False to https://github.com/ytdl-org/youtube-dl/blob/70d0d4f9beba0e5b6d95ee50ad62ae7ab5be9be1/youtube_dl/utils.py#L2079
+ # this accurately replicates the algorithm without as much complexity
+ written_id="$(sed -E -e 's/__+/_/g' \
+ -e 's/^_*(-_)?//' \
+ -e 's/^-/_/' \
+ <<< "${get_data[v]}")"
+ echo "Written id $written_id"
+ vid="$(cat "temp/${written_id}_https_-_"*"watch"*".dump")"
vid_json="$(tr -d '\n' <<< "$vid" | grep -Poh "ytInitialData.*?" | sed 's/ytInitialData = //;s/<\/script>//')"
strings[recommended]=$(jq -r '.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.results[] | .compactAutoplayRenderer.contents[0].compactVideoRenderer, .compactVideoRenderer | if .videoId != null then "