Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в Python в модуле re.
Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки.
pattern = re.compile(r"(\w+)+")
words = pattern.search(text, re.DOTALL)
А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как.
pattern.search(text, re.DOTALL | re.VERBOSE)
А теперь смотрим исходники, что находится в этих атрибутах?
Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево.
>>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]:
>>>
print(bin(n))
0b1
0b10
0b100
0b1000
0b10000
0b100000
0b1000000
0b10000000
0b100000000
Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули:
000000001
000000010
000000100
000001000
000010000
000100000
001000000
010000000
100000000
Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45
В общем, это пример применения побитовых операций в самом Python.
Теперь вы знаете Python еще немного лучше)
#tricks#regex#libs
YouTube Downloaders
You can use any of these downloaders to download videos directly from ReVanced/ReVanced Extended
➖➖➖➖➖➖➖➖➖➖
Open Source Downloader
- NewPipe 0.25.1
- NewPipe x Sponsorblock 0.25.1
- Seal 1.9.2
- YTDLnis 1.6.1
- SpotiFlyer 3.6.3
➖➖➖➖➖➖➖➖➖➖
Close Source Downloader
- PowerTube 5.0.3
- DVD 0.1.5
- YMusic 3.7.16
- YouTube Downloader 8.1
➖➖➖➖➖➖➖➖➖➖
- Set downloader to RVX/RV
Join: @ReVanced_MMT
Discussion | Archive
#downloader
SpotiFLAC📱
Mobile port of SpotiFLAC written in Flutter, powered by a Go backend for high performance. Download Spotify tracks in true FLAC from Tidal, Qobuz, & Amazon Music — no ads, no subscription.
- 📥DLs:GitHub
- 🖥Preview
- 🧑💻SourceCode
❤️Follow us:@AndroBusket
📨 Tags: #android#downloader#music
Cobalt
A media downloader website that doesn't piss you off. it's fast, friendly, and doesn't have any bullshit that modern web is filled with: no ads, trackers, or invasive analytics.
paste the link, get the file, move on. it's that simple. just how it should be. You can host your own instance
• bilibili.com & bilibili.tv
• dailymotion videos
• instagram reels, posts & stories
• ok video
• pinterest videos & stories
• reddit videos & gifs
• rutube videos
• soundcloud
• streamable.com
• tiktok videos, photos & audio
• tumblr video & audio
• twitch clips
• twitter videos & voice
• vimeo
• vine archive
• vk video & clips
• youtube videos, shorts & music
cobalt is not affiliated with any services listed above.
this list is not final and keeps expanding over time, make sure to check it once in a while!
https://cobalt.tools
https://github.com/wukko/cobalt
https://status.cobalt.tools
https://github.com/wukko/cobalt/blob/current/docs/troubleshooting.md
Review:
This thing recodes sound to MP3 by default (more lossy distortion on top of whichever lossy codec like AAC the original video uses) which is a very bad idea. Also it processes files and gives its own server links even if the file is something like a YT video that can be downloaded off the original Google servers (with no transcoding whatsoever specified in settings).
And it's all lowercase
#web#video#downloader#yt
FluTube
Multiplatform Youtube video downloader made using flutter.
Features:
- Lightweight and fast
- No Login Required
- Keep your liked videos and comments
- Playlists support
- Download videos, audios and thumbnails
- Ad free forever
- Available for Windows/Linux/Android
- Free libre and open source (FLOSS)
Download - https://github.com/prateekmedia/flutube/releases
https://github.com/prateekmedia/flutube
#yt#YouTube#video#downloader
@foss_Android