JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 14.01.2021, 12:35
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 171
Default

Here it gives 2 links (small + high), and I always like the highest resolution. It can be different with these links, I will try to provide more test links in the future if I run into problems.

**External links are only visible to Support Staff****External links are only visible to Support Staff**
Reply With Quote
  #22  
Old 14.01.2021, 12:54
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,349
Default

You can use REWRITE Linkcrawler Rule to rewrite the URL to parse the rlt_url only.
For this case prefiltering is the best solution as JDownloader cannot know if you are interested in the smaller version or the rlt_url or the yandex link itself
__________________
JD-Dev & Server-Admin
Reply With Quote
  #23  
Old 14.01.2021, 13:07
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 171
Default

"rlt_url" - I am not familiar with this terminology. More details needed.

Google search engine practically does not return any deeper information:
Code:
"rlt_url"
Reply With Quote
  #24  
Old 14.01.2021, 13:26
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 69,349
Default

See your example url, that's the url query parameter that holds the high resolution image in your case
__________________
JD-Dev & Server-Admin
Reply With Quote
  #25  
Old 14.01.2021, 13:47
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 171
Default

There is an application in which the user can view images in Yandex images via webbrowser, and then download the ones they like. Up to this point, a direct link to the image could be obtained as follows:

Code:
urlImage = HD.DocumentNode.SelectSingleNode("//a[@class='MMButton MMButton_type_link MMViewerButtons-OpenImage MMViewerButtons-OpenImage_isOtherSizesEnabled']").GetAttributeValue("href", "");
Reply With Quote
  #26  
Old 14.01.2021, 13:52
sharkboy sharkboy is offline
Banned
 
Join Date: Apr 2020
Posts: 171
Default

The application has a function for viewing images from Yandex images via webbrowser and downloading the selected one. I got the link like this:
Code:
1
urlImage = HD.DocumentNode.SelectSingleNode("//a[@class='MMButton MMButton_type_link MMViewerButtons-OpenImage MMViewerButtons-OpenImage_isOtherSizesEnabled']").GetAttributeValue("href", "");
Recently they have made changes to the code and now the data is loaded dynamically. The href attribute now contains "#", so the data cannot be downloaded.
Thought cefsharp would help, but it returns "#" too. Moreover, if you open the developer tools in the same chrome, the link to the image is displayed in the desired class. So, is it possible, through webbrowser or cefsharp, to get me to return the source code of the page with the already existing link to the picture?

The ways

Code:
var jsResponse = await chromeBrowser.EvaluateScriptAsync(@"document.getElementsByTagName ('html')[0].innerHTML");
            if (jsResponse.Success)
            {
                string source = jsResponse.Result.ToString();
            }
and

Code:
var source = await chromeBrowser.GetSourceAsync();
return the variant with "#" in the desired class, not with a reference.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 21:11.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.