Skip to content

Instantly share code, notes, and snippets.

@RanolP
Last active March 5, 2018 13:09
Show Gist options
  • Save RanolP/6315b596323adb5b395d8df07fd6b1ef to your computer and use it in GitHub Desktop.
Save RanolP/6315b596323adb5b395d8df07fd6b1ef to your computer and use it in GitHub Desktop.
Crowdin crawler
function crawl() {
let payload = {
file_id: crowdin.editor.file.id,
project_id: crowdin.editor.project.id,
filter: 0,
page: 0, // crawl all data
custom_filter: "{}",
target_language_id: 27, // korean
query: "",
search_option: 0
};
return new Promise(resolve => crowdin.ajax.postData("/phrases", payload, v => resolve(v.phrases.map(it => it.text))));
}
@RanolP
Copy link
Author

RanolP commented Mar 4, 2018

Crowdin 파일 페이지에 들어가서 콘솔 열고 붙여넣은 다음에

crawl().then(array => /* your code */)

하면 됩니다.

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