Skip to content

Commit 50af1f1

Browse files
fixed environment and redirected urls
1 parent b35fc97 commit 50af1f1

File tree

4 files changed

+42
-87
lines changed

4 files changed

+42
-87
lines changed

backend/app/api/routers/get_redirected_urls.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
router = APIRouter()
55

6-
@router.get("/get_redirected_urls/{url}")
7-
async def get_redirected_urls_from_url(url: str):
8-
return get_redirected_urls(url)
96

7+
@router.get("/get_redirected_urls/")
8+
async def get_redirected_urls_from_url(url: str):
9+
print(url)
10+
urls = get_redirected_urls(url)
11+
print(urls)
12+
return {"redirected_urls": urls}

backend/app/utils/get_redirected_urls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
def get_redirected_urls(url):
77
try:
8-
response = requests.get(url, allow_redirects=False)
8+
response = requests.get(url, allow_redirects=True000000000000)
99
if response.status_code == 200:
1010
soup = BeautifulSoup(response.content, "html.parser")
1111
links = soup.find_all("a", href=True)

backend/environment.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,80 @@ channels:
55
dependencies:
66
- _libgcc_mutex=0.1=main
77
- _openmp_mutex=5.1=1_gnu
8+
- _py-xgboost-mutex=2.0=cpu_0
89
- annotated-types=0.6.0=py311h06a4308_0
910
- anyio=4.3.0=pyhd8ed1ab_0
1011
- argon2-cffi=21.3.0=pyhd3eb1b0_0
1112
- argon2-cffi-bindings=21.2.0=py311h5eee18b_0
1213
- bcrypt=3.2.0=py311h5eee18b_1
14+
- beautifulsoup4=4.12.2=py311h06a4308_0
15+
- blas=1.0=mkl
16+
- bottleneck=1.3.7=py311hf4808d0_0
17+
- brotli-python=1.0.9=py311h6a678d5_7
18+
- bs4=4.12.2=py38hd3eb1b0_0
1319
- bzip2=1.0.8=h5eee18b_5
1420
- ca-certificates=2024.3.11=h06a4308_0
21+
- certifi=2024.2.2=py311h06a4308_0
1522
- cffi=1.16.0=py311h5eee18b_0
23+
- charset-normalizer=2.0.4=pyhd3eb1b0_0
1624
- click=8.1.7=py311h06a4308_0
1725
- cryptography=42.0.5=py311hdda0065_0
1826
- exceptiongroup=1.2.0=pyhd8ed1ab_2
1927
- fastapi=0.110.2=pyhd8ed1ab_0
2028
- h11=0.14.0=py311h06a4308_0
2129
- idna=3.7=pyhd8ed1ab_0
30+
- intel-openmp=2023.1.0=hdb19cb5_46306
31+
- joblib=1.4.0=py311h06a4308_0
2232
- ld_impl_linux-64=2.38=h1181459_1
2333
- libffi=3.4.4=h6a678d5_0
2434
- libgcc-ng=11.2.0=h1234567_1
35+
- libgfortran-ng=11.2.0=h00389a5_1
36+
- libgfortran5=11.2.0=h1234567_1
2537
- libgomp=11.2.0=h1234567_1
2638
- libstdcxx-ng=11.2.0=h1234567_1
2739
- libuuid=1.41.5=h5eee18b_0
40+
- libxgboost=2.0.3=h6a678d5_0
41+
- mkl=2023.1.0=h213fc3f_46344
42+
- mkl-service=2.4.0=py311h5eee18b_1
43+
- mkl_fft=1.3.8=py311h5eee18b_0
44+
- mkl_random=1.2.4=py311hdb19cb5_0
2845
- ncurses=6.4=h6a678d5_0
46+
- numexpr=2.8.7=py311h65dcdc2_0
47+
- numpy=1.26.4=py311h08b1b3b_0
48+
- numpy-base=1.26.4=py311hf175353_0
2949
- openssl=3.0.13=h7f8727e_0
50+
- pandas=2.2.1=py311ha02d727_0
3051
- passlib=1.7.4=pyhd3eb1b0_0
3152
- pip=23.3.1=py311h06a4308_0
53+
- py-xgboost=2.0.3=py311h06a4308_0
3254
- pycparser=2.21=pyhd3eb1b0_0
3355
- pydantic=2.5.3=py311h06a4308_0
3456
- pydantic-core=2.14.6=py311hb02cf49_0
57+
- pysocks=1.7.1=py311h06a4308_0
3558
- python=3.11.9=h955ad1f_0
59+
- python-dateutil=2.8.2=pyhd3eb1b0_0
60+
- python-tzdata=2023.3=pyhd3eb1b0_0
61+
- pytz=2024.1=py311h06a4308_0
3662
- readline=8.2=h5eee18b_0
63+
- requests=2.31.0=py311h06a4308_1
64+
- scikit-learn=1.2.2=py311h6a678d5_1
65+
- scipy=1.11.4=py311h08b1b3b_0
3766
- setuptools=68.2.2=py311h06a4308_0
3867
- six=1.16.0=pyhd3eb1b0_1
3968
- sniffio=1.3.1=pyhd8ed1ab_0
69+
- soupsieve=2.5=py311h06a4308_0
4070
- sqlite=3.41.2=h5eee18b_0
4171
- starlette=0.37.2=pyhd8ed1ab_0
72+
- tbb=2021.8.0=hdb19cb5_0
73+
- threadpoolctl=2.2.0=pyh0d69192_0
4274
- tk=8.6.12=h1ccaba5_0
4375
- typing-extensions=4.11.0=hd8ed1ab_0
4476
- typing_extensions=4.11.0=pyha770c72_0
4577
- tzdata=2024a=h04d1e81_0
78+
- urllib3=2.1.0=py311h06a4308_1
4679
- uvicorn=0.20.0=py311h06a4308_0
4780
- wheel=0.41.2=py311h06a4308_0
81+
- xgboost=2.0.3=py311h06a4308_0
4882
- xz=5.4.6=h5eee18b_0
4983
- zlib=1.2.13=h5eee18b_0
84+
prefix: /home/pupperemeritus/anaconda3/envs/fds

environment.yaml

-83
This file was deleted.

0 commit comments

Comments
 (0)