Skip to content
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

Strip emojis from filename #14474

Closed
sayem314 opened this issue Oct 12, 2017 · 3 comments
Closed

Strip emojis from filename #14474

sayem314 opened this issue Oct 12, 2017 · 3 comments

Comments

@sayem314
Copy link

@sayem314 sayem314 commented Oct 12, 2017

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.10.12. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.10.12

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

So we have --restrict-filenames option which remove any non-ascii character, but we do not have any option for removing emojis and keep other unicode character. For example, when I'm trying to download https://www.youtube.com/watch?v=TuXyA2sLzmk download will be succeeded but I can not play the file on android due to having emojis on filename.

Again if I use --restrict-filenames it would work smoothly however --restrict-filenames is really bad for non-english video. It would strip full filename where I would like to to youtube-dl support new feature which would respect unicode character while removing emojis and other unsupported by android platform.

BTW, Thanks for this awesome tool :)

@Hrxn
Copy link

@Hrxn Hrxn commented Oct 12, 2017

Emojis are Unicode characters as well 😄

@sayem314
Copy link
Author

@sayem314 sayem314 commented Oct 12, 2017

@Hrxn yes. What I meant is removing emojis and keep rest of the unicode character. Because on android emojis for filename is not supported.

We can do like this in Python:

my_regex = re.compile(r'\d\s*([^☺️|^🙅]+)')
string = "blah xzuyguhbc ibcbb bqw 2 extract1  ☺️ jbjhcb 6 extract2 🙅 bjvcvvv"
m = my_regex.findall(string)```
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 12, 2017

There's a (technically) similar issue at #5042. Please move on there for further discussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.