New to Python

47 views
Skip to first unread message

Mo El

unread,
May 15, 2018, 4:01:59 PM5/15/18
to Django users
Hi there,

I`m new to python and i have been watching a lot of tutorials regarding web scraping using python, and my question is what is the best library to use, and can someone help me to understand how to write a scrapped data to an HTML, say i scrapped some data from a website and i wanted to write that data to another page to view or use using python as well.

Your help is very much appreciated  

Larry Medina

unread,
May 16, 2018, 7:48:49 PM5/16/18
to django...@googlegroups.com
Beautiful Soup works really well to help render HTML.  I suppose you could scrape the website and save it as HTML.  The module can be found here: https://www.crummy.com/software/BeautifulSoup/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c97a930a-8691-4b8f-adb3-a067adc278ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


Regards,

Larry Medina

Derek

unread,
May 17, 2018, 4:32:57 AM5/17/18
to Django users
In addition to Beautiful Soup, you probably need Requests (http://docs.python-requests.org/en/master/).

Some examples of using these together:

https://gist.github.com/bradmontgomery/1872970

https://www.digitalocean.com/community/tutorials/how-to-work-with-web-data-using-requests-and-beautiful-soup-with-python-3

P.S. In future try to use a descriptive name for your post to the group; e.g. Looking for help on web scraping woith Python

Melvyn Sopacua

unread,
May 19, 2018, 2:04:06 PM5/19/18
to django...@googlegroups.com
On dinsdag 15 mei 2018 21:13:52 CEST Mo El wrote:

> I`m new to python and i have been watching a lot of tutorials regarding web
> scraping using python, and my question is what is the best library to use,

When asking for "best", try to make that more objective, by listing
requirements and nice to have features.

That said, you may want to take a look at scrapely:
https://pypi.org/project/scrapely/

> and can someone help me to understand how to write a scrapped data to an
> HTML, say i scrapped some data from a website and i wanted to write that
> data to another page to view or use using python as well.

Since you're in the Django user group, you would use Django and it's template
engine: https://docs.djangoproject.com/en/2.0/topics/templates/

--
Melvyn Sopacua
Reply all
Reply to author
Forward
0 new messages