opsci-toolbox 0.0.13__py3-none-any.whl → 0.0.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opsci_toolbox/apis/rapidapi_helpers.py +1 -2
- opsci_toolbox/apis/reddit.py +342 -334
- opsci_toolbox/apis/telegram.py +471 -41
- opsci_toolbox/helpers/common.py +3 -1
- opsci_toolbox/helpers/dates.py +1 -1
- opsci_toolbox/helpers/nlp.py +178 -33
- opsci_toolbox/helpers/nlp_cuml.py +47 -2
- opsci_toolbox/helpers/sna.py +34 -0
- {opsci_toolbox-0.0.13.dist-info → opsci_toolbox-0.0.15.dist-info}/METADATA +2 -2
- {opsci_toolbox-0.0.13.dist-info → opsci_toolbox-0.0.15.dist-info}/RECORD +13 -12
- opsci_toolbox-0.0.15.dist-info/dependency_links.txt +1 -0
- {opsci_toolbox-0.0.13.dist-info → opsci_toolbox-0.0.15.dist-info}/WHEEL +0 -0
- {opsci_toolbox-0.0.13.dist-info → opsci_toolbox-0.0.15.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,4 @@
|
|
1
1
|
import requests
|
2
|
-
from datetime import datetime
|
3
2
|
import pandas as pd
|
4
3
|
from tqdm import tqdm
|
5
4
|
import re
|
@@ -495,7 +494,7 @@ def parse_list_entries(jsonl_data: list)-> pd.DataFrame:
|
|
495
494
|
protected = data.get("protected", False)
|
496
495
|
verified = data.get("verified", False)
|
497
496
|
verified_type = data.get("verified_type", "")
|
498
|
-
entities = data.get("entities")
|
497
|
+
entities = data.get("entities", {})
|
499
498
|
urls = [url.get("expanded_url","") for url in entities.get('url', {}).get("urls",[])]
|
500
499
|
user_mentions = [um.get("screen_name","") for um in entities.get('description', {}).get('user_mentions', [])]
|
501
500
|
user_mentions_indices = [um.get("indices",[]) for um in entities.get('description', {}).get('user_mentions', [])]
|