Skip to content

Random python projects that I've made, since it's purely for my enjoyment and utility, I do not assure good code quality. Feel free to use things for yourself and change things around, preferably keep a reference to me in the script, but it is not required.

Notifications You must be signed in to change notification settings

ChristanVersteeg/python_projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This markdown is only relevant to the specific file in:

C:\Users\pooti\Desktop\python_projects\Game Utilities\MC\YouTubeVideoToMusicDisc\DiscDownloader.py The current version of pytube (15.0.0) is broken due to YT chaning their JS code, breaking the regex parsing. Here are the steps to fix the library:

Answer gotten from issue on the pytube github: pytube/pytube#1954 (comment)

  1. Make sure you've the newest version of pytube, pip install --upgrade pytube
  2. Open cmd
  3. Type pip show pip
  4. Find the Location field your cmd prints out
  5. Copy the Location path.
  6. Press Win+R
  7. Paste your copied location into the Win+R prompt
  8. Find pytube within your installed packages (either by looking it up in the search bar, or just type it whilst in folder view to get the quick result
  9. Open the pytube folder
  10. Find cipher.py (by the same steps as 7)
  11. Open cipher.py
  12. Go to line 264-274
  13. Replace that code with this:
    function_patterns = [
        # https://github.com/ytdl-org/youtube-dl/issues/29326#issuecomment-865985377
        # https://github.com/yt-dlp/yt-dlp/commit/48416bc4a8f1d5ff07d5977659cb8ece7640dcd8
        # var Bpa = [iha];
        # ...
        # a.C && (b = a.get("n")) && (b = Bpa[0](b), a.set("n", b),
        # Bpa.length || iha("")) }};
        # In the above case, `iha` is the relevant function name
        r'a\.[a-zA-Z]\s*&&\s*\([a-z]\s*=\s*a\.get\("n"\)\)\s*&&.*?\|\|\s*([a-z]+)',
        r'\([a-z]\s*=\s*([a-zA-Z0-9$]+)(\[\d+\])?\([a-z]\)',
        r'\([a-z]\s*=\s*([a-zA-Z0-9$]+)(\[\d+\])\([a-z]\)',
    ]

About

Random python projects that I've made, since it's purely for my enjoyment and utility, I do not assure good code quality. Feel free to use things for yourself and change things around, preferably keep a reference to me in the script, but it is not required.

Resources

Stars

Watchers

Forks

Packages

No packages published