Compare commits
No commits in common. "f37beb0a5d1c104dbb8930f541f749de849013da" and "8ffd92000744c4221528d6f844633cf622eaa492" have entirely different histories.
f37beb0a5d
...
8ffd920007
@ -54,6 +54,8 @@ namespace TeleTok
|
|||||||
|
|
||||||
// Passes the url along to the video downloader if it is valid AND a tiktok link
|
// Passes the url along to the video downloader if it is valid AND a tiktok link
|
||||||
if (isUri)
|
if (isUri)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if(messageText.Contains("tiktok.com"))
|
if(messageText.Contains("tiktok.com"))
|
||||||
{
|
{
|
||||||
@ -66,6 +68,11 @@ namespace TeleTok
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Console.WriteLine("Valid TikTok URI was sent, but was not a video!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Task HandlePollingErrorAsync(ITelegramBotClient botClient, Exception exception, CancellationToken cancellationToken)
|
Task HandlePollingErrorAsync(ITelegramBotClient botClient, Exception exception, CancellationToken cancellationToken)
|
||||||
|
@ -12,15 +12,13 @@ namespace TeleTok
|
|||||||
string url = videourl;
|
string url = videourl;
|
||||||
string proxyUrl;
|
string proxyUrl;
|
||||||
|
|
||||||
DateTime now =DateTime.Now;
|
|
||||||
|
|
||||||
if(url.Contains("vm.tiktok.com"))
|
if(url.Contains("vm.tiktok.com"))
|
||||||
{
|
{
|
||||||
url = UnshortenUrl(url);
|
url = UnshortenUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
proxyUrl = TeleTok.ptInstance + "/download?url=" + url;
|
proxyUrl = TeleTok.ptInstance + "/download?url=" + url;
|
||||||
Console.WriteLine("[" + now.ToString() + "] " + "Video for " + url + " has been sent..");
|
Console.WriteLine("Video for " + url + " has been sent..");
|
||||||
|
|
||||||
return proxyUrl;
|
return proxyUrl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user