kharrigian / retriever Goto Github PK
View Code? Open in Web Editor NEWA wrapper for API wrappers.
A wrapper for API wrappers.
There's a bug in retrieve_submission_comments
. The general except Exception
hid it. Don't do that. The PRAW fallback block didn't turn the list into a DataFrame, which threw an error when it got to df.sort_values
, and the program thought it was a request error instead of a code error so it keeps making requests and failing.
Here's the modified code:
## Fall Back to PRAW
if hasattr(self, "_init_praw") and self._init_praw and len(df) == 0:
temp_dfs = []
for s in submissions_clean:
temp_dfs.append(self._retrieve_submission_comments_praw(submission_id=s))
df = pd.concat(temp_dfs)
## Sort
if len(df) > 0:
df = df.sort_values("created_utc", ascending=True)
df = df.reset_index(drop=True)
return df
except Exception as e:
self.logger.warning(f"{e}")
sleep(backoff)
backoff = 2 ** backoff
PSAW is no longer maintained and has a number of bugs that lead to sub-optimal query performance. Either find an alternative package or fork and update.
PSAW + Reddit APIs appear to have changed, making much of the functionality in this package obsolete. A complete re-factor is probably the best approach for addressing these issues and making things functional again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.