Comments (21)
Thanks for the bugreport @jonzey231. What happened when you tried to run the script, and how did that differ from what you expected?
from recipe-scrapers.
I don't know how to run it in the first place. I guess I'm asking for help on how to actually use this.
from recipe-scrapers.
Ok, no problem - to confirm, you do have Python and pip
installed, yep?
from recipe-scrapers.
Correct. Both are installed in Windows.
from recipe-scrapers.
Ok, great! Next up is to check whether you've been able to get this library (recipe-scrapers
) installed -- and then let's figure out the first recipe for you to scrape. Have you begun reading the README
file or should I give you some time to review that first?
from recipe-scrapers.
from recipe-scrapers.
I'm just getting scraper: command not found
from recipe-scrapers.
Hrm, OK. Could you try running python
before entering the next commands? Here's more-or-less the output you should get (the text on the first line will probably be different on your system):
> python
Python 3.12.4 (main, Jun 12 2024, 19:06:53) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from recipe_scrapers import scrape_me
>>>
from recipe-scrapers.
This is my output when I run python
>python
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
This is my output when I run python from recipe_scrapers import scrape_me
File "<stdin>", line 1
python from recipe_scrapers import scrape_me
^
SyntaxError: invalid syntax
from recipe-scrapers.
Maybe I'm just not sure what command to actually run at this point?
from recipe-scrapers.
Update: I misunderstood what you meant.
When I run python from recipe_scrapers import scrape_me
this is the output:
\Desktop\recipe-scrapers-main>python from recipe_scrapers import scrape_me
python: can't open file 'Desktop\recipe-scrapers-main\from': [Errno 2] No such file or directory
from recipe-scrapers.
That's OK, take your time. Could you try them as two separate commands?
python
- to open a Python interpreter session (the>>>
should appear as a prompt).from recipe_scrapers import scrape_me
- this is a statement within the Python session; we're asking it to import a function namedscrape_me
from this library.
from recipe-scrapers.
Got it. Now I'm here:
Desktop\recipe-scrapers-main> python
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from recipe_scrapers import scrape_me
>>>
from recipe-scrapers.
Excellent :) OK. Do you have any particular recipe webpage that you want to scrape from, or should we choose one at random?
from recipe-scrapers.
So my original hope was to just get all HelloFresh recipe URLs but it seems like that isn't going to be possible.
Let's use this one: https://www.hellofresh.com/recipes/vegan-firecracker-mushroom-rice-bowls-666863a6223895220f198073
from recipe-scrapers.
Afraid not, yep - it's one URL at a time. We can use that one though, to get a sense for how the functionality works. That would be:
scraper = scrape_me('https://www.hellofresh.com/recipes/vegan-firecracker-mushroom-rice-bowls-666863a6223895220f198073')
from recipe-scrapers.
Done!
from recipe-scrapers.
Ok, we've got ourselves a scraper
variable :) Now you should be able to use that to access the information from the recipe -- also, it's boring, but I should mention: please be responsible if re-publishing information from recipes (the core of recipes are not copyrightable in many places, but some aspects of the site's content may be).
>>> print(scraper.title())
>>> print(scraper.ingredients())
from recipe-scrapers.
If it's OK with you: I'll edit the title of this thread because the discussion gives me a few ideas for how we can improve the top of our README
file (so thank you!). If you'd prefer though, I can omit any references to this conversation when making those changes (and I'll leave the thread title as-is).
from recipe-scrapers.
Yes please and thank you for all the help! I think I've got it down. Have a great night!
from recipe-scrapers.
You're welcome - you too!
from recipe-scrapers.
Related Issues (20)
- Gousto.co.uk not parsing some ingredients correctly HOT 1
- README: repeated partial top-level domains (.co.uk) as hyperlink targets are invalid rST syntax HOT 2
- Add scraper for chetnamakan.co.uk
- Test fail with missing README.rst HOT 3
- shopping list is not visible HOT 1
- schoolofwok.co.uk
- IrishCentral
- tasteofhome HOT 3
- Allrecipes HOT 3
- Whatsgabycooking.com no longer working for some recipies
- Americastestkitchen.com family missing now HOT 2
- Maintenance: a few cleanup/consistency improvements.
- SchemaOrg.ratings_count: return an integer type instead of a floating-point number.
- Tests: remove 'ingredient_groups' check for scrapers that don't support/implement ingredient groups. HOT 4
- CI: Codacy static analysis began reporting errors for Markdown lines greater than 80 char-length. HOT 6
- V14: using 'scrape_html' for an unsupported website unexpectedly implies 'wild_mode'.
- Bug: nosalty scraper missing from supported-scrapers dictionary.
- Bug: deprecation notice for 'options' incorrectly emits message when 'wild_mode' argument is provided.
- Bypass Cloudflare script HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recipe-scrapers.