Giter VIP home page Giter VIP logo

Comments (5)

Ryu1845 avatar Ryu1845 commented on June 22, 2024 1

It looks like the binary exe at least, but I don't think the error is caused by it.
I'd guess there's a problem in how I escape strings

from twspace-dl.

eggplants avatar eggplants commented on June 22, 2024

@emintokluu you should move code section into code block like this:

C:>.\twspace_dl -i https://twitter.com/i/spaces/1vAxRkepLArKl
Traceback (most recent call last):
File "C:\Users\GLNAZP1\AppData\Local\Temp\ONA8AA1_main_.py", line 142, in
File "C:\Users\GLNAZP1\AppData\Local\Temp\ONA8AA1_main_.py", line 133, in main
File "C:\Users\GLNAZP1\AppData\Local\Temp\ONA8AA1\twspace_dl\TwspaceDL.py", line 226, in download
File "C:\Users\GLNAZP1\AppData\Local\Temp\ONA8AA1\twspace_dl\TwspaceDL.py", line 216, in write_playlist
FileNotFoundError: [Errno 2] No such file or directory: '\[S\.G\.\]Traders\ Talk\ 🎙\-1vAxRke pLArKl.m3u8'

Did you execute binary exe?

from twspace-dl.

eggplants avatar eggplants commented on June 22, 2024

https://gist.github.com/wassname/1393c4a57cfcbf03641dbc31886123b8

import unicodedata
def escape(s):
    return unicodedata.normalize(
      "NFKC", s.replace(' ', '_')
    )[:255]

s = '[S.G.]Traders Talk 🎙-1vAxRke pLArKl.m3u8'
escape(s)
#=> '[S.G.]Traders_Talk_🎙-1vAxRke_pLArKl.m3u8'

from twspace-dl.

eggplants avatar eggplants commented on June 22, 2024
def escape(s):
    return ''.join(["_" if c in '%:,./\\[]|<>*?\'"' else c for c in s])[:255]

s = '[S.G.]Traders Talk 🎙-1vAxRke pLArKl'
escape(s) + '.m3u8'
#=> 'S_G__Traders Talk 🎙-1vAxRke pLArKl.m3u8'

from twspace-dl.

Ryu1845 avatar Ryu1845 commented on June 22, 2024

I modified this function https://gist.github.com/dbr/256270

from twspace-dl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.