-
-
Save SeanMcGrath/fb4f9e1869a2252738c9398d5ceb5395 to your computer and use it in GitHub Desktop.
Has anyone had any luck on either script? Seems the old nor the new one have been working for me.
I haven't had a lot of time to dig into it, but last I checked poshmark had changed their UI in such a way that this kind of approach is now much more difficult, maybe impossible. Would love to be proved wrong though
New script is working for me.
…
On Wed, Sep 9, 2020 at 7:32 PM yada-yoda @.> wrote: @.* commented on this gist. ------------------------------ Has anyone had any luck on either script? Seems the old nor the new one have been working for me. — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://gist.github.com/fb4f9e1869a2252738c9398d5ceb5395#gistcomment-3447434, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQCDM643TGRVHX2OX4CCULSE6DJFANCNFSM4I3QBTDQ .
-- HAVE A NICE DAY......
Are you using it in a Chrome Snippet in the Developer panel or as a JS Bookmarklet? Seems none of them are working for me from my closet
Also this is the error in the console I receive when trying to run the latest, if it helps at all:
VM505:1 Uncaught SyntaxError: Identifier 'poshmark_share_closet' has already been declared
The new script is working perfectly for me in the firefox developer console.
i suspect it's working for some people and not others due to experimental features poshmark is showing to some % of users. It's normal for sites like this to A/B test different UIs, and there seems to be at least one variant where this doesn't work
This is such elegant and beautiful and clean code, I have no javascript background but your notes are so clear and code easy to follow!!! Kudos!!!
Hi, after many days of success, it has stopped working, I can see the page is still sharing, but I do not get the shared successfully notification. Any ideas how to fix it? Thank you!
This code seems to be working which is awesome, but can anyone provide a code that shares the items in reverse? ( from the end of the closet to the top) This will ensure the whole closet gets share, otherwise when the captcha comes up it starts sharing from the top again and only a portion of the closet gets share in a loop. If no captcha comes up the entire closet gets share which is great but often times the captcha pops up more than once in a short amount of time, thus the same items keep re-sharing and a portion don't get shared. Sorry for the ramble, I have no background in coding at all and I'm just learning as I go. Thanks in advance :)
Sean :
The code runs just fine, however I don't know in which order is sharing the items, so as a computer programmer I am trying to understand the code ( I am java programmer, not javascript) and I found thing that I really don't understand, if you could elaborate a little bit in regard where they come from or how did you came up with them, for example :
1. - const clickLinks = (el) => {
el.click(); The variable "el" where does it come from, where it was declared ?
2.- "[data-et-name^='share_poshmark']" How did you come up with this string ? or
'.sold-tag,.sold-out-tag,.not-for-sale-tag' the same for these tags, where did you get them, if could eleborate by explaining more or which tool you used to know all this, it would be a great help.
Thanks in advance
clickLinks
is a function defined using ES6 arrow notation. el
is the function's single argument.
The strings you are referring to are known as CSS selectors. I constructed them by inspecting the Poshmark DOM and figuring out what attributes were used to identify valid share buttons.
Seems like this is broken, as of today. Tried on several browsers/machines with the same result, the action isn't getting triggered. Is anyone else noticing this?
Yes, stopped working yesterday :(
This script had a great run,i appreciate you helping with my sales.
fixed, poshmark renamed the "tile" class to "card" and the script had to be updated to reflect this.
You rock! Thank you so much!
thank you worked perfectly well! any other codes to share other sellers listings and follow?)))
I forked this gist here to accommodate larger closets with 40+ items for anyone with that need!
https://gist.github.com/ianmcilwraith/30dbeb61edda08c2be039818067a1781
@SeanMcGrath Thanks for sharing this code! I have a question about the last 2 lines:
share();
setInterval(share, cycleDelta);
I'm presuming that cycleDelta get incremented after it's first declared, so that it adds up to the total amount of time it takes to get through one cycle. But I don't understand how. Can you explain? (I'm new to JavaScript, so apologies if this is a silly question.)
cycleDelta
is the interval between runs of the share
function. the value of cycleDelta
itself is constant. setInterval(x, y)
runs the specified function x
every y
milliseconds.
updated to incorporate @ianmcilwraith 's changes (thanks!) and also stop scrolling down the page once sold items are found.
var clickDelta = 2000; // ms delay between clicks
var cycleDelta = clickDelta * 100; // ms delay between share cycles
// do the actual clicking
var clickLinks = function() {
$(this).click();
$("[data-pa-name^='share_poshmark']").click();
};
var notSold = function(el) {
return $(el).closest('.tile').find('.sold-tag,.sold-out-tag,.not-for-sale-tag').length === 0;
};
function share() {
var timeout = 0;
var doShare = function() {
if (notSold(this)) {
// register link clicking
setTimeout(clickLinks.bind(this), timeout);
};
share();
setInterval(share, cycleDelta);