-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent specifying video as short due to web-scraping abuse #330
Labels
bug
Something isn't working
medium priority
A high-priority issue noticeable by the user but he can still work around it.
quick
A task that should take less than two hours to complete.
Comments
grep -ri 'isRedirection(' Output:
|
grep -r 'getHeadersFromOpts' Output:
|
grep -ri 'redirect' --exclude-dir={.git,tools} Output:
|
die(json_encode($http_response_header)); |
Bash script:VIDEO_IDS=(
ydPkyvWtmg4
NiXD4xVJM5Y
)
for videoId in "${VIDEO_IDS[@]}"
do
echo -n "$videoId: "
curl -s "http://localhost/YouTube-operational-API/videos?part=short&id=$videoId" | jq .items[0].short.available
done Output:
|
Knowing that https://www.youtube.com/shorts/VIDEO_ID redirects to https://www.youtube.com/watch?v=VIDEO_ID only if it is not a short.
We want
|
So the point is more about verifying the redirected URL to be as expected if any. So could refine web-scraping detected detection to not just rely on HTTP codes. |
|
Fix #330: Change `isRedirection` to `getRedirection` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
medium priority
A high-priority issue noticeable by the user but he can still work around it.
quick
A task that should take less than two hours to complete.
As requested on Discord.
Related to #11.
The text was updated successfully, but these errors were encountered: