AI4Finance-Foundation / AI4Finance-Foundation/FinNLP
Reddit scrapping doesnt work - AttributeError: 'NoneType' object has no attribute 'text'
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 1.5k
- Forks
- 276
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I simply pasted the example code for Reddit and it errored out..
Downloading by pages...: 0%| | 0/3 [00:00 11 downloader.download_streaming_all(pages)
12 selected_columns = ["created", "title"]
13 downloader.dataframe[selected_columns].head(10)
File ~/FinNLP/finnlp/data_sources/social_media/reddit_streaming.py:40, in Reddit_Streaming.download_streaming_all(self, rounds)
38 if rounds > 1:
39 for _ in range(1,rounds):
---> 40 last_id = self._fatch_other_pages(last_id, pbar)
File ~/FinNLP/finnlp/data_sources/social_media/reddit_streaming.py:82, in Reddit_Streaming._fatch_other_pages(self, last_page, pbar)
49 data = {
50 "id": "02e3b6d0d0d7",
51 "variables": {
(...)
79 }
80 }
81 response = self._request_post(url = url, headers= headers, json = data)
---> 82 data = json.loads(response.text)
83 data = data["data"]["subredditInfoByName"]["elements"]["edges"]
84 for d in data:
AttributeError: 'NoneType' object has no attribute 'text'
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.