10 Commits

Author SHA1 Message Date
63e95a3a63 Update Build.yml 2024-02-02 19:28:33 +07:00
a61a5fbb8a Update MicroG.ps1 2024-02-02 19:28:12 +07:00
f10c8abf4e Update Build.ps1 2024-02-02 19:27:48 +07:00
8242b06085 Revert "Update YouTube.ps1"
This reverts commit bdca80cf21.
2024-01-02 14:17:04 +07:00
bdca80cf21 Update YouTube.ps1 2024-01-02 01:16:22 +07:00
271a6e13c6 Update YouTube.ps1 2024-01-02 01:11:11 +07:00
7f15206c6d Fix indents
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-12-01 21:08:39 +07:00
dab245fc0d Update Build.yml
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-12-01 13:03:21 +07:00
aec3595c1f Update YouTube.ps1
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-12-01 12:58:17 +07:00
6d79dcd962 Update Build.ps1
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2023-12-01 12:57:50 +07:00
4 changed files with 44 additions and 56 deletions

View File

@@ -1,9 +1,6 @@
name: Build
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
@@ -51,14 +48,14 @@ jobs:
-jar "Temp\revanced-cli.jar" patch `
--patch-bundle "Temp\revanced-patches.jar" `
--merge "Temp\revanced-integrations.apk" `
--exclude "always-autorepeat" `
--exclude "hide-captions-button" `
--exclude "hide-timestamp" `
--exclude "hide-seekbar" `
--exclude "Always repeat" `
--exclude "Hide captions button" `
--exclude "Hide timestamp" `
--exclude "Hide seekbar" `
--purge `
--resource-cache "Temp\Temp" `
--out "Temp\revanced.apk" `
"Temp\youtube.apk"
# --resource-cache "Temp\Temp" `
- name: Create archive
run: |
@@ -85,6 +82,5 @@ jobs:
uses: softprops/action-gh-release@master
with:
tag_name: ${{ env.RELEASE_NAME }}
token: ${{ github.token }}
files: ReVanced.zip
body_path: ${{ steps.read_release.outputs.ReleaseBody }}
files: ReVanced.zip

View File

@@ -41,30 +41,26 @@ $versions = ($JSON | Where-Object -FilterScript {$_.compatiblePackages.name -eq
$LatestSupported = $versions | Sort-Object -Descending -Unique | Select-Object -First 1
$LatestSupported = $LatestSupported.replace(".", "-")
# Trying to find correct APK link (not BUNDLE)
# https://www.apkmirror.com/apk/google-inc/youtube/
$apkMirrorLink = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/"
# Try to find correct NON-Bundle version
$Parameters = @{
Uri = $apkMirrorLink
Uri = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/youtube-$($LatestSupported)-android-apk-download/"
UseBasicParsing = $false # Disabled
Verbose = $true
}
$Request = Invoke-Webrequest @Parameters
$Request.ParsedHtml.getElementsByClassName("table-row headerFont") | ForEach-Object -Process {
foreach ($child in $_.children)
{
if ($child.innerText -eq "nodpi")
{
$apkPackageLink = ($_.getElementsByTagName("a") | Select-Object -First 1).nameProp
break
}
}
$URLParse = (Invoke-Webrequest @Parameters).Links.outerHTML | Where-Object -FilterScript {$_ -like "*YouTube $($LatestSupported.replace("-", ".")) (nodpi)*"}
# Check if variable contains a data
if ($URLParse)
{
$URL = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/youtube-$($LatestSupported)-android-apk-download/"
}
else
{
$URL = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/youtube-$($LatestSupported)-2-android-apk-download/"
}
$apkMirrorLink += $apkPackageLink # actual APK link (not BUNDLE)
# Get unique key to generate direct link
$Parameters = @{
Uri = $apkMirrorLink
Uri = $URL
UseBasicParsing = $false # Disabled
Verbose = $true
}
@@ -72,7 +68,7 @@ $Request = Invoke-Webrequest @Parameters
$nameProp = $Request.ParsedHtml.getElementsByClassName("accent_bg btn btn-flat downloadButton") | ForEach-Object -Process {$_.nameProp}
$Parameters = @{
Uri = $apkMirrorLink + "/download/$($nameProp)"
Uri = "$($URL)/download/$($nameProp)"
UseBasicParsing = $false # Disabled
Verbose = $true
}
@@ -134,9 +130,9 @@ $Parameters = @{
}
Invoke-RestMethod @Parameters
# https://github.com/TeamVanced/VancedMicroG
# https://github.com/inotia00/VancedMicroG
$Parameters = @{
Uri = "https://api.github.com/repos/TeamVanced/VancedMicroG/releases/latest"
Uri = "https://api.github.com/repos/inotia00/VancedMicroG/releases/latest"
UseBasicParsing = $true
Verbose = $true
}
@@ -150,7 +146,8 @@ $Parameters = @{
Invoke-RestMethod @Parameters
# Sometimes older version of zulu-jdk causes conflict, so remove older version before proceeding.
if (Test-Path -Path "$WorkingFolder\ReVanced\jdk") {
if (Test-Path -Path "$WorkingFolder\ReVanced\jdk")
{
Remove-Item -Path "$WorkingFolder\ReVanced\jdk" -Recurse -Force
}
@@ -185,10 +182,10 @@ Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force
-jar "$WorkingFolder\ReVanced\revanced-cli.jar" patch `
--patch-bundle "$WorkingFolder\ReVanced\revanced-patches.jar" `
--merge "$WorkingFolder\ReVanced\revanced-integrations.apk" `
--exclude "always-autorepeat" `
--exclude "hide-captions-button" `
--exclude "hide-timestamp" `
--exclude "hide-seekbar" `
--exclude "Always repeat" `
--exclude "Hide captions button" `
--exclude "Hide timestamp" `
--exclude "Hide seekbar" `
--purge `
--resource-cache "$WorkingFolder\ReVanced\Temp" `
--out "$WorkingFolder\ReVanced\revanced.apk" `

View File

@@ -1,6 +1,6 @@
# https://github.com/TeamVanced/VancedMicroG
# https://github.com/inotia00/VancedMicroG
$Parameters = @{
Uri = "https://api.github.com/repos/TeamVanced/VancedMicroG/releases/latest"
Uri = "https://api.github.com/repos/inotia00/VancedMicroG/releases/latest"
UseBasicParsing = $true
Verbose = $true
}

View File

@@ -16,31 +16,26 @@ Add-Type -Path $AngleSharpAssemblyPath
# Create parser object
$angleparser = New-Object -TypeName AngleSharp.Html.Parser.HtmlParser
# Trying to find correct APK link (not BUNDLE)
# https://www.apkmirror.com/apk/google-inc/youtube/
$apkMirrorLink = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupported)-release/"
# Try to find correct NON-Bundle version
$Parameters = @{
Uri = $apkMirrorLink
Uri = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupportedYT)-release/youtube-$($LatestSupportedYT)-android-apk-download/"
UseBasicParsing = $false # Disabled
Verbose = $true
}
$Request = Invoke-Webrequest @Parameters
$Parsed = $angleparser.ParseDocument($Request.Content)
$Parsed.All | Where-Object -FilterScript {$_.ClassName -match "table-row headerFont"} | ForEach-Object -Process {
foreach($child in $_.children)
{
if ($child.InnerHtml -eq "nodpi")
{
$apkPackageLink = (($_.getElementsByTagName("a") | Select-Object -First 1).Href).Substring(57)
break
}
}
$URLParse = (Invoke-Webrequest @Parameters).Links.outerHTML | Where-Object -FilterScript {$_ -like "*YouTube $($LatestSupported) (nodpi)*"}
# Check if variable contains a data
if ($URLParse)
{
$URL = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupportedYT)-release/youtube-$($LatestSupportedYT)-android-apk-download/"
}
else
{
$URL = "https://www.apkmirror.com/apk/google-inc/youtube/youtube-$($LatestSupportedYT)-release/youtube-$($LatestSupportedYT)-2-android-apk-download/"
}
$apkMirrorLink += $apkPackageLink # actual APK link (not BUNDLE)
# Get unique key to generate direct link
$Parameters = @{
Uri = $apkMirrorLink
Uri = $URL
UseBasicParsing = $false # Disabled
Verbose = $true
}
@@ -49,7 +44,7 @@ $Parsed = $angleparser.ParseDocument($Request.Content)
$Key = $Parsed.All | Where-Object -FilterScript {$_.ClassName -match "accent_bg btn btn-flat downloadButton"} | ForEach-Object -Process {$_.Search}
$Parameters = @{
Uri = $apkMirrorLink + "download/$($Key)"
Uri = "$($URL)/download/$($Key)"
UseBasicParsing = $true
Verbose = $true
}
@@ -66,4 +61,4 @@ $Parameters = @{
}
Invoke-Webrequest @Parameters
echo "LatestSupportedYT=$LatestSupportedYT" >> $env:GITHUB_ENV
echo "LatestSupportedYT=$LatestSupported" >> $env:GITHUB_ENV