Python Forum
Beautifulsoup don't get me the page
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beautifulsoup don't get me the page
#1
Hi. I use this code
import requests
from bs4 import BeautifulSoup
pagina1="https://www.fragrantica.com/perfume/Chanel/Coco-Eau-de-Parfum-609.html"
pagina1=requests.get(pagina1, headers = {'User-agent': 'your bot 0.1'})
soup=BeautifulSoup(pagina1.content,"html.parser")
print(soup)
the result is not the source code of the page but someting like
<!DOCTYPE html>

<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
<meta id="captcha-bypass" name="captcha-bypass"/>
and a few more lines.
What happened? Why I can't get the source code with beautifulsoup?
Thank you
Reply


Messages In This Thread
Beautifulsoup don't get me the page - by mariolopes - Oct-20-2019, 05:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Beautifulsoup doesn't scrape page (python 2.7) Hikki 0 2,583 Aug-01-2020, 05:54 PM
Last Post: Hikki
  use Xpath in Python :: libxml2 for a page-to-page skip-setting apollo 2 4,642 Mar-19-2020, 06:13 PM
Last Post: apollo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020