Manual captcha solving imacros - captcha

I'm trying to make a macro which given an URL its asks me for the captcha and re-submits a listing, so far this is what I have:
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=about:newtab
URL GOTO=http://www.revolico.com/modificar-anuncio.html?key=WyqAGDMyFyoH15527264
WAIT SECONDS=6
URL GOTO=javascript:window.scrollBy(0,20000)
PROMPT "Enter captcha" !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:insertad ATTR=ID:recaptcha_response_field CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:insertad ATTR=NAME:send_form
I don't want to scroll all the way down to see the captcha but to show the image in the prompt, can anyone help me?
This is a classified ads website and you can use the given url to test.
Thanks in advance,

you just need to add tags to images of post scroll right in the picture
like this:
TAG POS = 1 TYPE = a ATTR = DIV ID: adcopy-puzzle-image
change the id of the image fits the image on the website that may help

Related

Page elements seen in the browser dev tools are not retrieved by ChromeHeadless

In this page :
https://www.bedbathandbeyond.com/store/product/o-o-by-olivia-oliver-turkish-modal-bath-towel-collection/5469128?categoryId=13434
I can see a button with "Add to Cart" text , I can also see it in dev tools.
But when the same page source is retrieved by ChromeHeadless using selenium, and my script searches for it, this text is not present.
I tried with selecting show page source in the browser, the source too did not have the "Add To Cart text"
Further I used a curl to GET page, "Add To Cart" wasn't in the returned page source either.
What am I doing wrong?
is the page hiding the button?
How can I check for its presence, for product availability check?
The elements you are looking for are inside the shadow DOM. You need to access the shadow root first. Hard to see exactly what is going on in the DOM without some trial and error, but something like this:
WebElement shadowHost = driver.findElement(By.cssSelector("#wmHostPdp"));
SearchContext shadowRoot = shadowHost.getShadowRoot();
WebElement addToCart = shadowRoot.findElement(By.cssSelector(".shipItBtnCont button"));
More info on Shadow DOM & Selenium — https://titusfortner.com/2021/11/22/shadow-dom-selenium.html

How can I find an iframe when it doesn't have a name or id?

I'm making a selenium project and as a part of it I need to login into an account on www.allmovie.com. I have noticed that when clicking on "log in" button it switches to an iframe. It is required that I use driver.switchTo().frame() for all iframes in the project, but I cant identify id, name or an index for the login page. What can I do here?
login page image
iframe like any other webelement can by located by id, class, tag, xpath, css etc., not just by id.
So that iframe can be located by following css_selector iframe since it's a unique tag name of that element.
driver.switchTo().frame(driver.findElement(By.cssSelector("iframe")));
Or with //iframe xpath selectror.
driver.switchTo().frame(driver.findElement(By.xpath("//iframe")));
add some waits and check
code snippet in Python Selenium
iframe = WebDriverWait(driver,2).until(EC.presence_of_element_located((By.CSS_SELECTOR, "body > div.login-modal > iframe")))
driver.switch_to.frame(iframe)

Add a video to Shopify product page

I am trying to add a video instead of image in to Shopify store. I tried using ALT image code embed video but it did't work. So how can I do it? I found some stores do that please see this site:
https://www.beardbrand.com/collections/utility-balm/products/tree-ranger-utility-beard-balm
I need exactly the same.
Here's a simple way to set a video as your product image.
In your admin - select a product you would like to add a video to.
Hover over a product image you would like to add your youtube video to.
Select "Edit Alt Text"
Paste your Youtube embed link in the dialog box.
Save your changes!

Buddypress How to change every user's avatar url from add_filter(bp_core_fetch_avatar)?

I am trying to change the buddypress user avatar's url. When user click other user's avatar, it will go to the user's specific field instead of the default url 'activity'. I had search through internet, I think I should add_filter bp_core_fetch_avatar to change the avatar's url, but I had tried for hours to hack, no luck. Hope somebody could help me here. Appreciate.
You don't want to change the avatar url. You want to change the link in the href wrapped around an avatar. That link is usually handled by bp_member_permalink()
So try using this filter hook:
apply_filters( 'bp_get_member_permalink', bp_core_get_user_domain( $members_template->member->id, $members_template->member->user_nicename, $members_template->member->user_login ) );

Hotlinking: How do I differentiate between an image in a <img> tag versus an image link?

I want to allow partial hotlinking to images on my website. I want to allow a specific site (Reddit) to be able to show an image from my website on their page, but if they click on the link to the image from that site, it should go to an image viewing page, rather than directly the image itself.
For example:
This other website should be able to have this
<img src="http://mySite.com/myImage.jpg"/>
on their page, and it should show the image. However, if they have this:
Link Text
A user who clicks on that link should get redirected to an image viewing page that contains some html, including the image, rather than directly to the image.
I'm trying to achieve this via mod_rewrite. However, those two cases have the same HTTP_REFERER. Is there anyway for my server to differentiate between that?
There is no way to do such thing! but if second site is your you can put optional query string at the end of URL the distinguish between them!