fix: too long filename is now right supported
This commit is contained in:
		
							
								
								
									
										3
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								main.py
									
									
									
									
									
								
							@ -6,6 +6,7 @@ import os
 | 
			
		||||
import sys
 | 
			
		||||
import subprocess
 | 
			
		||||
from operator import itemgetter
 | 
			
		||||
from urllib.parse import unquote
 | 
			
		||||
 | 
			
		||||
def get_files(url: str) -> []:
 | 
			
		||||
    if (url in ["/../", "../"]):
 | 
			
		||||
@ -18,7 +19,7 @@ def get_files(url: str) -> []:
 | 
			
		||||
    files = []
 | 
			
		||||
    for element in soup.findAll("a"):
 | 
			
		||||
        file = {}
 | 
			
		||||
        file.update({"name": element.text})
 | 
			
		||||
        file.update({"name": unquote(element['href'])})
 | 
			
		||||
        file.update({"link": element["href"]})
 | 
			
		||||
        files.append(file)
 | 
			
		||||
    return (files)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user