You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.
Are there options to add custom parameters to URL requests or session cookies? I need to set youtube preferences such as language or country. Without them i can't scrape comments of some YT videos which are blocked in my country
The text was updated successfully, but these errors were encountered:
I can click on user pic or "3 dots" if not logged in -> Location, and choose any country. This way I can access videos that YouTube does not allow to play in my country.
The same thing I can set up via the URL parameter &gl=AU (for example, AU for Australia) appending it to any Youtube request.
Or via the cookie: PREF="gl=AU"
This cookie to set up country & switch interface language to English: PREF="gl=AU&hl=en"
Language code "hl=en" to localize "time" strings such as "3 months ago" to the desired language in the Scraper's output .
As a temporary solution I modified the file:
youtube-comment-scraper-cli/node_modules/youtube-comments-task/dist/lib/youtube-api/url-builder.js
To the string return VIDEO_PAGE_URL + '?' + query;
I added +'&gl=AU';
Now it works.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Are there options to add custom parameters to URL requests or session cookies? I need to set youtube preferences such as language or country. Without them i can't scrape comments of some YT videos which are blocked in my country
The text was updated successfully, but these errors were encountered: