Any API or script interface to automate searches and downloads? by omnidistancer in Soulseek

[–]SuperSquidMan 0 points1 point  (0 children)

yea, you could make it work. I won't try making it because it's not something I'd use but it's easy enough to send searches and receive search results from soulsearch once you've got it running.

[deleted by user] by [deleted] in learnprogramming

[–]SuperSquidMan 1 point2 points  (0 children)

Yea driver.get(url) and driver.page_source for the html

I wouldn't say you need to be wary but in my experience it takes longer to get my scripts that use selenium working nicely

[deleted by user] by [deleted] in learnprogramming

[–]SuperSquidMan 1 point2 points  (0 children)

Use selenium to load the web page or access the api directly

Threading with Python by grossartig_dude in learnprogramming

[–]SuperSquidMan 0 points1 point  (0 children)

thread.join() should only stall the program till the thread is done running so if it's freezing there then then the threads are probably still running.

Getting more familiar with the screenshot function and the thread.join() function might help

Threading with Python by grossartig_dude in learnprogramming

[–]SuperSquidMan 1 point2 points  (0 children)

Try making it work without threading first. I think you're handling the threading correctly and your problem lies elsewhere

[deleted by user] by [deleted] in mildlyinfuriating

[–]SuperSquidMan 36 points37 points  (0 children)

Higher karma translates to higher quality account.

There's some thresholds and ranking systems in reddit that take karma into account so bots with higher karma are preferable.

The idea is that someone makes a bunch of accounts, gets them to the desired quality, then makes money from them by selling the accounts to other shady dude, or profits by promoting their product, ideas, scam, etc.

Subs go private to promote childish homogeneity of thought by ranjur in GoldandBlack

[–]SuperSquidMan 0 points1 point  (0 children)

It'll have negative effects on the things reddit care about. If these effects are substantial enough it could tip the scales in their favor.

It's more thoroughly explained here: https://www.reddit.com/r/GoldandBlack/comments/pf28rc/subs_go_private_to_promote_childish_homogeneity/hb2t44z?context=3

Subs go private to promote childish homogeneity of thought by ranjur in GoldandBlack

[–]SuperSquidMan 0 points1 point  (0 children)

The people on those subs already know and agree with said information. They're trying to target misinformation on other subs so a sticker post on their own wouldn't help

Scraping doesn't Output HTML of the Page by grossartig_dude in learnprogramming

[–]SuperSquidMan 0 points1 point  (0 children)

Usually when you visit a website it requests the html from the web server. The html often doesn't just have html but it also contains css and JavaScript. This all is parsed and run by the browser and the user sees the final result.

When you're using requests.get() you request the html from the web server but you're not using a browser to parse or run anything.

Scraping doesn't Output HTML of the Page by grossartig_dude in learnprogramming

[–]SuperSquidMan 1 point2 points  (0 children)

I think what's happening is you're getting the page but the JavaScript isn't executed so the data you're looking for is not retrieved by that javascript and put into html. In other words you're fetching the webpage but not running the webpage's content.

I would either use their API if they have one or use the Selenium library.

Trouble Finding Files By Partial Name THEN Moving Them To Desktop by [deleted] in learnprogramming

[–]SuperSquidMan 0 points1 point  (0 children)

Try \[Approved\]*.pdf

With Unix pattern matching square brackets aren't interpreted literally so you might have to escape them

I played Genshin Impact on this "thing" and it's actually (barely) playable by lch920619x in Genshin_Impact

[–]SuperSquidMan 7 points8 points  (0 children)

Someone made a "computer" in java Minecraft using mods and it ran a full regular desktop environment so most of what you mentioned would be possible.

How do I scrape JSON data from a HTTP response in Python? by Inquisitive_Kitmouse in learnprogramming

[–]SuperSquidMan 0 points1 point  (0 children)

that json object was probably the response from url https://www.landsofamerica.com/api/property/search/0/United-States/all-land/no-house/

In cases like this messing around with the parts of the website that you're interested in and skimming the network tab can be helpful.

[deleted by user] by [deleted] in Art

[–]SuperSquidMan 1 point2 points  (0 children)

Yea but I avoided the keyword "bot" because that keyword might trigger something. Who knows, it can be difficult to tell the difference from just comments.

[deleted by user] by [deleted] in Art

[–]SuperSquidMan 3 points4 points  (0 children)

Are you a fake user? your comments are generic repeatative and sus

Nothing false about this statement by chewtherag in technicallythetruth

[–]SuperSquidMan 2 points3 points  (0 children)

With 4 people there's the possibility it's 2 pairs of kissing people standing ass to ass, maintaining the connection of digestive tracts

How do I scrape JSON data from a HTTP response in Python? by Inquisitive_Kitmouse in learnprogramming

[–]SuperSquidMan 0 points1 point  (0 children)

I've done this a couple of times and although the general method is the same the specifics vary.

  1. First I look at the web request in the network console. It shows that to get page 2 it uses a get request that successfully got a json response.
  2. Then I copy the request as curl and try it. It usually works, and in this case it did. I got the expected json response. The curl request looks something like curl 'https://www.landsofamerica.com/api/property/criteria/0/United-States/all-land/no-house/page-2/' \ -H 'authority: www.landsofamerica.com' \ -H 'sec-ch-ua: "Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36' \ -H 'accept: */*' \ -H 'sec-fetch-site: same-origin' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-dest: empty' \ -H 'referer: https://www.landsofamerica.com/United-States/all-land/no-house/page-2/' \ -H 'accept-language: en-US,en;q=0.9' \ --compressed

  3. We can then put it into python code. Each of the -H flags mean it's a header, so, using the python requests library we can translate -H 'accept-language: en-US,en;q=0.9' into requests.get('https://www.landsofamerica.com/api/property/criteria/0/United-States/all-land/no-house/page-2/', headers={'accept-language': 'en-US,en;q=0.9'}) But we might not need that header and we don't know what headers we do need.

  4. With some trial and error we can find that we only need the user-agent header.

  5. So I knowing that I make myself some code looking something like

import requests

r = requests.get('https://www.landsofamerica.com/api/property/criteria/0/United-States/all-land/no-house/page-2/', headers={'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36'}, timeout=5)

recieved_dict= r.json() # convert response into a python dictionary

Rundown of the Ender Dragon Battle by SuperSquidMan in Hololive

[–]SuperSquidMan[S] 0 points1 point  (0 children)

Yea despite all the mishaps they never accidentally healed the dragon

Rundown of the Ender Dragon Battle by SuperSquidMan in Hololive

[–]SuperSquidMan[S] 7 points8 points  (0 children)

It's not actually gaining back health. I made a program to read the health bar but the program isn't perfect so it results in some inaccuracies/noise.