Skip to content

Commit b385712

Browse files
committed
Filter to IG,FB,YT and TT. Down to 1166 links
1 parent 7869371 commit b385712

File tree

4 files changed

+32
-251
lines changed

4 files changed

+32
-251
lines changed

googlesearch.ipynb

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": 22,
66
"id": "e36a7e0b",
77
"metadata": {},
88
"outputs": [],
@@ -21,7 +21,29 @@
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": 3,
24+
"execution_count": 38,
25+
"id": "c285f9c6",
26+
"metadata": {},
27+
"outputs": [
28+
{
29+
"data": {
30+
"text/plain": [
31+
"((1287, 5), (1164, 5))"
32+
]
33+
},
34+
"execution_count": 38,
35+
"metadata": {},
36+
"output_type": "execute_result"
37+
}
38+
],
39+
"source": [
40+
"df = pd.read_csv(\"supplements.csv\")\n",
41+
"df.shape,df[df.source.isin([\"Instagram\", \"TikTok\", \"YouTube\", \"Facebook\"])].shape"
42+
]
43+
},
44+
{
45+
"cell_type": "code",
46+
"execution_count": 21,
2547
"id": "b542f394",
2648
"metadata": {},
2749
"outputs": [],
@@ -33,7 +55,7 @@
3355
},
3456
{
3557
"cell_type": "code",
36-
"execution_count": 4,
58+
"execution_count": 17,
3759
"id": "889b794c",
3860
"metadata": {},
3961
"outputs": [],
@@ -43,7 +65,7 @@
4365
},
4466
{
4567
"cell_type": "code",
46-
"execution_count": 5,
68+
"execution_count": 18,
4769
"id": "20312a24",
4870
"metadata": {},
4971
"outputs": [],
@@ -56,7 +78,7 @@
5678
},
5779
{
5880
"cell_type": "code",
59-
"execution_count": 6,
81+
"execution_count": 19,
6082
"id": "40cf9486",
6183
"metadata": {},
6284
"outputs": [],

run_googlesearch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def main():
180180
# Save results
181181
print("\nSaving results...")
182182
df.sort_values(by="link", inplace=True)
183+
df = df[df.source.isin(["Instagram", "TikTok", "YouTube", "Facebook"])]
183184
df.to_csv("supplements.csv", index=False)
184185
df.link.drop_duplicates().to_csv("supplements_links.txt", index=False, header=False)
185186
print("Saved to: supplements.csv and supplements_links.txt")

0 commit comments

Comments
 (0)