mirror of
				https://github.com/hexated/cloudstream-extensions-hexated.git
				synced 2024-08-15 00:03:22 +00:00 
			
		
		
		
	[Sora] small fix in moviesbay
This commit is contained in:
		
							parent
							
								
									25e2deb249
								
							
						
					
					
						commit
						cffce41393
					
				
					 3 changed files with 11 additions and 2 deletions
				
			
		|  | @ -1,5 +1,5 @@ | ||||||
| // use an integer for version numbers | // use an integer for version numbers | ||||||
| version = 64 | version = 65 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| cloudstream { | cloudstream { | ||||||
|  |  | ||||||
|  | @ -1536,8 +1536,9 @@ object SoraExtractor : SoraStream() { | ||||||
|             val size = media[index.minus(1)] |             val size = media[index.minus(1)] | ||||||
|             val quality = media[index.minus(2)] |             val quality = media[index.minus(2)] | ||||||
|             val qualityName = media[index.minus(3)] |             val qualityName = media[index.minus(3)] | ||||||
|  |             val gdriveLink = getDirectGdrive(it) | ||||||
| 
 | 
 | ||||||
|             val doc = app.get(it).document |             val doc = app.get(gdriveLink).document | ||||||
|             val form = doc.select("form#download-form").attr("action") |             val form = doc.select("form#download-form").attr("action") | ||||||
|             val uc = doc.select("input#uc-download-link").attr("value") |             val uc = doc.select("input#uc-download-link").attr("value") | ||||||
|             val link = app.post( |             val link = app.post( | ||||||
|  |  | ||||||
|  | @ -254,6 +254,14 @@ suspend fun extractCovyn(url: String?): Pair<String?, String?>? { | ||||||
|     return Pair(videoLink, size) |     return Pair(videoLink, size) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | fun getDirectGdrive(url: String): String { | ||||||
|  |     return if(url.endsWith("share_link")) { | ||||||
|  |         "https://drive.google.com/uc?id=${url.substringAfter("/d/").substringBefore("/")}&export=download" | ||||||
|  |     } else { | ||||||
|  |         url | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| suspend fun bypassFdAds(url: String): String? { | suspend fun bypassFdAds(url: String): String? { | ||||||
|     val res = app.get(url).document |     val res = app.get(url).document | ||||||
|     val freeRedirect = res.selectFirst("a#link")?.attr("href") |     val freeRedirect = res.selectFirst("a#link")?.attr("href") | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue