mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-09 09:59:51 +01:00
fix "copy magnet to clipboard" error
The info hash can contain uppercase hex digits as well.
This commit is contained in:
parent
890d6a7d85
commit
f115bfd8d3
@ -236,7 +236,7 @@ def copy_magnets(printer, chosen_links, results):
|
||||
clipboard_text = ''
|
||||
for link in chosen_links:
|
||||
magnet = results[link]['magnet']
|
||||
info_hash = int(re.search(r'btih:([a-f0-9]{40})', magnet).group(1), 16)
|
||||
info_hash = int(re.search(r'btih:([a-fA-F0-9]{40})', magnet).group(1), 16)
|
||||
clipboard_text += magnet + "\n"
|
||||
printer.print('Copying {:X} to clipboard'.format(info_hash))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user