add lite.tiktok to rewrite links
This commit is contained in:
		
							parent
							
								
									1b85aff129
								
							
						
					
					
						commit
						2834f31982
					
				| @ -5,6 +5,7 @@ use curl::easy::Easy; | ||||
| static URLS: phf::Map<&'static str, &'static str> = phf_map! { | ||||
|     "www.tiktok.com" => "vxtiktok.com", | ||||
|     "vm.tiktok.com" => "vxtiktok.com", | ||||
|     "lite.tiktok.com" => "vxtiktok.com", | ||||
|     "https://x.com" => "https://fxtwitter.com", | ||||
|     "https://twitter.com" => "https://fxtwitter.com", | ||||
| }; | ||||
| @ -43,7 +44,7 @@ pub fn get_domain_from_text(text: String) -> (String, String) { | ||||
|     for word in text.split(' ') { | ||||
|         for domain in URLS.keys() { | ||||
|             if word.contains(domain) { | ||||
|                 if String::from(*domain).contains("vm.tiktok.com") { | ||||
|                 if String::from(*domain).contains("vm.tiktok.com") || String::from(*domain).contains("lite.tiktok.com") { | ||||
|                     let url = match get_tiktok_redirection(String::from(word)) { | ||||
|                         Ok(furl) => furl, | ||||
|                         Err(_e) => String::from(word), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user