Comments (3)
from bs4 import BeautifulSoup
import requests
def find_parent_id(comment_id, user):
try:
i = 0
while True:
data = requests.get(
f"https://scratch.mit.edu/site-api/comments/user/{user}/?page=" + str(i)).text
soup = BeautifulSoup(data, features="html.parser")
comment = soup.find(id="comments-" + str(comment_id))
if comment != None:
return comment.parent.parent.parent.find(class_="comment")["data-comment-id"]
break
i += 1
except AttributeError:
return comment_id
from scratchattach.
I know about that and TimMcCool likely also does. I am just suggesting it be implemented.
from scratchattach.
Okay, I agree it should be good to implement :D
from scratchattach.
Related Issues (20)
- How to check if user exists? HOT 2
- Weird error??? HOT 1
- How do i get a Project from a list of them? HOT 5
- How do i sign in with an incorrect password, and make the program know that something is incorrect without crashing HOT 2
- Make api request functions unlimited #206 HOT 3
- Implement a Proper Way to Check “New Scratcher” Status HOT 8
- Implement a Way to Check Account Status HOT 2
- (upcoming update) Enhance cloud requests by replacing busy-sleep event loop HOT 6
- Scratch project response list is randomly (at least seems like randomly) displaying "Error: Check the Python console" HOT 4
- How do you create a request in the python code HOT 3
- 'User' object has no attribute 'is_new_scratcher' HOT 2
- Bug in the function of obtaining cloud variables HOT 1
- How do/can I package a scratchattach project using the turbowarp packager? HOT 2
- SESSION IDS EXPIRED HOT 2
- Why events.user reports None while logged in? HOT 5
- Set varibles in multiple ones without a request HOT 2
- I need [ , ] , { and } characters HOT 7
- The TwCloudConnection.set_var() function is not setting cloud variables. HOT 2
- Can't reply replies HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scratchattach.