aMockTie

joined 1 year ago
[–] aMockTie@beehaw.org 5 points 2 days ago

100% this. Every website is different, though after doing this kind of thing for long enough, there are often common patterns and frameworks/libraries. Even general obfuscation can be reasonably reverse engineered with enough time and effort.

[–] aMockTie@beehaw.org 2 points 2 days ago

I agree that OP sounds like a beginner, and what you've suggested is likely the best approach for someone who is familiar with frontend tools and frameworks. Selenium (and admittedly BeautifulSoup) is probably too low level for this particular user, but that doesn't mean they can't still learn some fundamentals while solving this problem without resorting to something as heavy and complicated as background browser emulation and rendering. I could be wrong though.

[–] aMockTie@beehaw.org 1 points 2 days ago

I'm not currently on Discord, could you upload the code to pastebin or something similar?

https://pastebin.com/

[–] aMockTie@beehaw.org 1 points 2 days ago (2 children)

I would love to see your code, but I understand if this forum isn't the most ideal place to share.

[–] aMockTie@beehaw.org 3 points 2 days ago (2 children)

In my experience, this scenario typically means that there is some sort of API (very likely undocumented) that is being used on the backend. That requires a bit more investigation and testing with browser developer tools, the JS Console, and often trial and error. But once you overcome that (admittedly very complex and technical) hurdle, you can almost always get away with just using the requests library at that point.

I've had to do that kind of thing more times than I'd like to admit, but the juice is almost always worth the squeeze.

[–] aMockTie@beehaw.org 4 points 2 days ago (11 children)

Selenium is really more of a testing framework for frontend developers, and could theoretically be used for scraping, but that would be somewhat like buying a car based on the paint and not looking in detail under the hood.

I can't say I've ever worked with scrappy, but the tool I would use for web scraping with Python is BeautifulSoup. This tutorial seems decent enough, but you will need to understand basic web concepts like IDs, classes, tags, and tag attributes to get the most out of the tutorial: https://geekpython.medium.com/web-scraping-in-python-using-beautifulsoup-3207c038723b

W3Schools will also be your friend if you have questions about HTML/CSS selectors in general: https://www.w3schools.com/html/default.asp

Understanding regular expressions and/or xpath would also be very helpful, but are probably best considered to be extra credit in most cases.

I'll try to respond if you have any issues or questions, but hopefully that gives you enough to get started.

[–] aMockTie@beehaw.org 14 points 4 months ago (1 children)

Thank you for the detailed response!

I see now that you were responding to the title and not the content of the post.

To further round out my knowledge and understanding, could you please point me to additional information about Latinos moving further to the right, Harris' popularity, and polling data showing her well behind Trump in key states?

I'm also curious to see examples of the American left refusing to acknowledge the potential of a second Trump term.

Thanks again for helping me understand.

[–] aMockTie@beehaw.org 22 points 4 months ago (3 children)

I'm not sure if I understand the points you are trying to make. Could you please elaborate? A) this meme is about records broken, not "wins." A president winning a second term would not break any records. B) why wouldn't Americans vote for a black woman? C) why would the thought of Americans electing a black women be "cult like?"

[–] aMockTie@beehaw.org 3 points 4 months ago (1 children)

I'm sorry, I hope I didn't offend you.

I'm still not sure if I understand the intended joke. An average of 41 attempts per person sounds horrific. I'm sure there is something that's going over my head, it's some kind of dark humor, correct?

[–] aMockTie@beehaw.org 2 points 4 months ago* (last edited 4 months ago) (1 children)

I sincerely hope that she has been trending in a positive direction. I'm glad to hear that her attempts have been unsuccessful, and that she has good love, support, and (hopefully helpful) medication in her life.

I imagine the knowledge of your sister struggling and suffering is hard on you too, and I wish the best for both of you.

[–] aMockTie@beehaw.org 2 points 4 months ago

Thank you, I agree that it's an important distinction to make. Having only been able to read the abstract of the linked article, do you perhaps have any information on the number of completed attempts compared to unsuccessful attempts?

I hope it goes without saying that even a single attempt is too many, and any completed attempts are devastating tragedies that don't reflect kindly on our current society.

[–] aMockTie@beehaw.org 4 points 4 months ago (3 children)

I don't understand, could you please elaborate?

x = x/1 = x is true for all numbers, no?

view more: next ›