CEF update+new Insta buttons #1
@ -43,12 +43,13 @@ alObject.prototype.initializeSettings = function(tag, likesMin, likesMax, delayM
|
||||
}
|
||||
}
|
||||
|
||||
alObject.prototype.instagramStartClickProcess = function(retry=true) {
|
||||
alObject.prototype.instagramStartClickProcess = function(retry=0) {
|
||||
let thisObj = this;
|
||||
thisObj._postItems = [];
|
||||
console.log('*** instagramStartClickProcess ***');
|
||||
window.scrollTo(0,0);
|
||||
thisObj.runDelay(10000, () => {
|
||||
window.scrollTo(0, 0);
|
||||
thisObj.log(' - wait 20s for page to load...');
|
||||
thisObj.runDelay(20000, () => {
|
||||
thisObj.log((new Date()).toLocaleString() + ': Starting click process ..');
|
||||
let top_posts = jQuery('h2').eq(0);
|
||||
let most_recent = jQuery('h2').eq(1);
|
||||
@ -61,10 +62,10 @@ alObject.prototype.instagramStartClickProcess = function(retry=true) {
|
||||
|
||||
if (jump_to_section == null || jump_to_section == 0) {
|
||||
thisObj.log('ERROR: couldn\'t find most recent or top posts sections!');
|
||||
if (retry) {
|
||||
thisObj.log(' - retrying after 60 seconds (to give IG time to load).');
|
||||
thisObj.runDelay(60000, () => {
|
||||
thisObj.instagramStartClickProcess(false);
|
||||
if (retry<2) {
|
||||
thisObj.log(' - Retry #' + (retry+1) + ': retrying after 30 seconds (to give IG time to load).');
|
||||
thisObj.runDelay(30000, () => {
|
||||
thisObj.instagramStartClickProcess(retry++);
|
||||
});
|
||||
} else {
|
||||
thisObj.runDelay(1000, () => {
|
||||
@ -121,7 +122,7 @@ alObject.prototype.instagramClickPost = function(img, x, y) {
|
||||
});
|
||||
}
|
||||
|
||||
alObject.prototype.instagramLoopOverPostsClick = function(index) {
|
||||
alObject.prototype.instagramLoopOverPostsClick = function (index) {
|
||||
let thisObj = this;
|
||||
// initial index
|
||||
if (!index) {
|
||||
@ -130,21 +131,34 @@ alObject.prototype.instagramLoopOverPostsClick = function(index) {
|
||||
thisObj.log("Like post; " + index + " of " + thisObj._maxLikes);
|
||||
// like button
|
||||
//let likeBtn = jQuery('body').find('span._aamw button._abl-').eq(0); // Update: 2022-06-11
|
||||
let likeBtn = jQuery('body').find('span._aamw span:has(svg)').eq(0); // Update: 2023-09-12
|
||||
//let likeBtn = jQuery('body').find('span._aamw span:has(svg)').eq(0); // Update: 2023-09-12
|
||||
//let likeBtn = document.querySelectorAll("html svg[aria-label='Like'],html svg[aria-label='Unlike']"); // Update: 2024-02-05 (can't use because rest requires jQuery)
|
||||
let likeBtn = jQuery('body').find('svg[aria-label="Like"], svg[aria-label="Unlike"]').eq(0); // Update (2024-02-05)
|
||||
|
||||
console.log('likeBtn:');
|
||||
console.log(likeBtn);
|
||||
// next button
|
||||
//let nextBtn = jQuery('a.coreSpriteRightPaginationArrow').eq(0);
|
||||
//let nextBtn = jQuery('div.l8mY4 button.wpO6b');
|
||||
let nextBtn = jQuery('div._aaqg button._abl-');
|
||||
//let nextBtn = jQuery('div._aaqg button._abl-');
|
||||
let nextBtn = jQuery('body').find("svg[aria-label='Next'], svg[aria-label='Navigate to previous item']").eq(0); // Update (2024-02-05)
|
||||
console.log('nextBtn:');
|
||||
console.log(nextBtn);
|
||||
// check if like button exists, if not restart
|
||||
if (likeBtn.length == 0) {
|
||||
thisObj.log(' - Could not find the "Like" button :(');
|
||||
if (likeBtn.length > 0) {
|
||||
console.log(' - Found "like" button object');
|
||||
likeBtn = likeBtn.parent();
|
||||
if (nextBtn.length > 0) {
|
||||
thisObj.instagramClickNextButton(nextBtn, index);
|
||||
nextBtn = nextBtn.parent();
|
||||
} else {
|
||||
nextBtn = null;
|
||||
}
|
||||
} else {
|
||||
thisObj.log(' - Could not find the "Like" button');
|
||||
if (nextBtn.length > 0) {
|
||||
thisObj.instagramClickNextButton(nextBtn.parent(), index);
|
||||
} else {
|
||||
thisObj.log(' - Could not find the "Next" button');
|
||||
thisObj.restartProcess();
|
||||
}
|
||||
}
|
||||
@ -198,7 +212,7 @@ alObject.prototype.instagramLoopOverPostsClick = function(index) {
|
||||
|
||||
alObject.prototype.instagramClickNextButton = function(nextBtn, i) {
|
||||
let thisObj = this;
|
||||
if (i < thisObj._maxLikes) {
|
||||
if (i < thisObj._maxLikes && nextBtn) {
|
||||
thisObj.log(" - Waiting before clicking on next button ..");
|
||||
let nextBtnOffset = nextBtn.offset();
|
||||
console.log(nextBtnOffset);
|
||||
@ -217,7 +231,11 @@ alObject.prototype.instagramClickNextButton = function(nextBtn, i) {
|
||||
});
|
||||
});
|
||||
} else {
|
||||
thisObj.log(" - Reached end of list of posts, restarting process ..");
|
||||
if (!nextBtn) {
|
||||
thisObj.log(" - Couldn't find Next button, restarting process ..");
|
||||
} else {
|
||||
thisObj.log(" - Reached end of list of posts, restarting process ..");
|
||||
}
|
||||
thisObj.runDelay(3000, () => {
|
||||
thisObj.restartProcess();
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.116.0.19\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.116.0.19\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.116.0.19\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.116.0.19\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.120.2.7\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.120.2.7\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.120.2.7\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.120.2.7\build\cef.redist.x64.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@ -83,14 +83,14 @@
|
||||
<ApplicationIcon>Resources\autoliker-512.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CefSharp, Version=116.0.190.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.116.0.190\lib\net462\CefSharp.dll</HintPath>
|
||||
<Reference Include="CefSharp, Version=120.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.120.2.70\lib\net462\CefSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.Core, Version=116.0.190.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.116.0.190\lib\net462\CefSharp.Core.dll</HintPath>
|
||||
<Reference Include="CefSharp.Core, Version=120.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.120.2.70\lib\net462\CefSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.Wpf, Version=116.0.190.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Wpf.116.0.190\lib\net462\CefSharp.Wpf.dll</HintPath>
|
||||
<Reference Include="CefSharp.Wpf, Version=120.2.70.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Wpf.120.2.70\lib\net462\CefSharp.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MaterialDesignColors, Version=2.1.4.0, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MaterialDesignColors.2.1.4\lib\net462\MaterialDesignColors.dll</HintPath>
|
||||
@ -99,7 +99,7 @@
|
||||
<HintPath>..\packages\MaterialDesignThemes.4.9.0\lib\net462\MaterialDesignThemes.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.77\lib\net462\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@ -196,12 +196,12 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.116.0.19\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.116.0.19\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.116.0.19\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.116.0.19\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\MaterialDesignThemes.4.9.0\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MaterialDesignThemes.4.9.0\build\MaterialDesignThemes.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.120.2.7\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.120.2.7\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.120.2.7\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.120.2.7\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.116.0.190\build\CefSharp.Common.targets')" />
|
||||
<Import Project="..\packages\MaterialDesignThemes.4.9.0\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.4.9.0\build\MaterialDesignThemes.targets')" />
|
||||
<Import Project="..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.120.2.70\build\CefSharp.Common.targets')" />
|
||||
</Project>
|
||||
@ -21,7 +21,7 @@ namespace AutoLikerCefSharpWpf
|
||||
InitializeComponent();
|
||||
|
||||
// version
|
||||
this.AutoLikerVersion = "v2.0.3-20230914";
|
||||
this.AutoLikerVersion = "v2.0.6-20240205";
|
||||
this.DataContext = this;
|
||||
// manage settings in UI
|
||||
this._alsm = new AutoLikerSettingsManager(this);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="cef.redist.x64" version="116.0.19" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="116.0.19" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="116.0.190" targetFramework="net472" />
|
||||
<package id="CefSharp.Wpf" version="116.0.190" targetFramework="net472" />
|
||||
<package id="cef.redist.x64" version="120.2.7" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="120.2.7" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="120.2.70" targetFramework="net472" />
|
||||
<package id="CefSharp.Wpf" version="120.2.70" targetFramework="net472" />
|
||||
<package id="MaterialDesignColors" version="2.1.4" targetFramework="net472" />
|
||||
<package id="MaterialDesignThemes" version="4.9.0" targetFramework="net472" />
|
||||
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.39" targetFramework="net472" />
|
||||
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.77" targetFramework="net472" />
|
||||
</packages>
|
||||
Loading…
x
Reference in New Issue
Block a user