TheAlgorithms / website

The Algorithms website providing GitHub's largest open-source algorithm library.
https://the-algorithms.com
MIT License
848 stars 186 forks source link

[BUG] <description> #229

Closed thomasthaddeus closed 9 months ago

thomasthaddeus commented 1 year ago

Description of the bug

Making a copy of the info as an issue on this repo. All of the info is in issue #8164 from the python repository.

The Amazon search algorithm doesn't work.

Add screenshots of the bug (if applicable)

image

Additional information/context

Repository commit

222715391-2b3d3a33-d553-481c-8577-56950e913eaf

Python version (python --version)

python 3.9

Dependencies version (pip freeze)

python=3.9 requests not in loader

Expected behavior

I'm not exactly sure other than I loaded it on the website, and this was the default behavior.

Actual behavior

image

Have you installed all of the requirements from the requirements.txt file? If you don't know how to do this navigate to you command line inside the file directory where this repo is and type: pip install -r requirements.txt

And which file are you trying to run. From the title I am guessing this is the get_amazon_product_data.py file

And as you aren't sure what the expected behavior is, it seems that it should give you a csv file with all of the amazon product data for the product type searched, which you can change to whatever search you want at the end.

this is on the webpage for this repo. Is the try this function not working image

I see, it doesn't work for me either. In this case if you want to use the code then I guess just try it out on your own machine until they fix this.

Should the issue stay open as a website issue or is there a better way of classifying the bug

I think but am not 100% that you should instead add this as an issue to the website repo here And add all of the info that we discussed so they understand the problem better. Also tell them that bs4 isn't install either. The other packages are installed.

maltejur commented 1 year ago

Since the python code is directly running in the browser, there are some limitations to what you can do on the website. It seems like pyodide (the library used to run python in the browser) doesn't offer a easy way to use python requests. I would suggest you just run the code locally.