this post was submitted on 26 Dec 2023
1 points (55.6% liked)

Selenium Web Browser Automation

101 readers
4 users here now

Users forum for selenium browser testing. Do not advertise here.

founded 2 years ago
MODERATORS
 

Hi, so I post around 30 facebook market place ads a month, its a super tideious task and could easily be done by a computer. The issue is, is that facebook has such a weird structure when I inspect elements. the image attached is a example of it, the class names are this weird code, and I cant find any names, ids, on these elements to give to Selenium. at the moment I use py auto GUI + selenium to click around the web page, but this is super hard coded and doesn't work all the time. so please let me know what you guys recommend

top 8 comments
sorted by: hot top controversial new old
[โ€“] grff 6 points 11 months ago (1 children)

I think they do this on purpose so it makes it difficult to do what you are describing

[โ€“] arm321 1 points 11 months ago

yes i thought exactly that, its annoying tho cause I'm not trying to spam or scam lol, I'm genuinely trying to spend less time ๐Ÿ˜‚

[โ€“] treesquid 6 points 11 months ago (1 children)

If it was easy to automate, then spammers, scammers and corporate pigfuckers would completely inundate marketplace with so much garbage it would be utterly unusable. Accept that the only reason your 1 Facebook ad per day produces any results at all is because it's hard to automate, and if it weren't, nobody would ever see any of your ads. The fact that you're hunting for IDs instead of page structure patterns already suggests a novice level, so imagine all you needed was awareness that Selenium exists in order to spam Marketplace to death with MLM ads and scam posts. There are already way too many scam posts when a person actually has to interact with the site. If you could easily do what you want, you wouldn't be able to sell anything, because >99% of content would be bot posts without aggressive content moderation. That moderation would either be human, which is expensive, or automated, which would be very inaccurate and take down more legitimate posts. There's no world where you can legitimately automate this and bad actors can't.

If I had an answer that would help you, I would never post it because it would actively degrade everyone's Marketplace experience, including yours, until FB fixed it and made it hard to automate again.

[โ€“] arm321 1 points 11 months ago (1 children)

yeah i understand your point completely, and it makes sense why they made it so hard. Thing is that I genuinely post this many ads for my furniture business and all of them are legit. it just sucks cause its so time consuming

[โ€“] Nindelofocho 1 points 11 months ago

Why not buy Facebook advertising space then? Users looking for furniture on fb marketplace are typically looking for cheap used furniture and occasionally the weird antique to refurbish

[โ€“] surewhynotlem 2 points 11 months ago (1 children)

You could use autoIT, or something with an x,y coordinate click.

[โ€“] arm321 2 points 11 months ago

its hard coded that way, i really don't like that approach, one that I use at the moment is py auto gui

[โ€“] [email protected] 1 points 11 months ago

Facebook does it utmost best to make it HARD. so yes, auto gui/hotkey-like solutions are probably the only way..