feat: advanced url processing, whitespaces issue
This commit is contained in:
		
							
								
								
									
										2
									
								
								util.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								util.py
									
									
									
									
									
								
							@@ -302,7 +302,7 @@ def get_url_from_input(string):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    match = re.search("(http|https)://(.*)?/(.*)", string, flags=re.IGNORECASE)
 | 
					    match = re.search("(http|https)://(\S*)?/(\S*)", string, flags=re.IGNORECASE)
 | 
				
			||||||
    if match:
 | 
					    if match:
 | 
				
			||||||
        url = match[1].lower() + "://" + match[2].lower() + "/" + match[3]
 | 
					        url = match[1].lower() + "://" + match[2].lower() + "/" + match[3]
 | 
				
			||||||
        return url
 | 
					        return url
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user