Skip to content

Instantly share code, notes, and snippets.

@xatuke
Last active September 19, 2020 22:09
Show Gist options
  • Save xatuke/d30f08e574bf9f94aa66c70cbf5f4df6 to your computer and use it in GitHub Desktop.
Save xatuke/d30f08e574bf9f94aa66c70cbf5f4df6 to your computer and use it in GitHub Desktop.

Revisions

  1. xatuke revised this gist Sep 19, 2020. 2 changed files with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions mpvplaylist.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    #!/usr/bin/python3
    import requests
    import re
    folder = input()
    File renamed without changes.
  2. xatuke created this gist Sep 19, 2020.
    1 change: 1 addition & 0 deletions howtorun.owo
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    echo "<folder_url>" | python mpvplaylist.py | mpv --playlist=- --playlist-start=X
    8 changes: 8 additions & 0 deletions mpvplaylist.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    import requests
    import re
    folder = input()
    data = requests.get(folder)
    lines = data._content.decode('utf-8')
    files = re.findall('href="(.*)"', lines)
    for i in range(1, len(files)):
    print(folder+files[i])