Soundcloud Email Scraper with Python and BS4

问题描述 投票:0回答:1

[仅尝试抓取具有此代码的电子邮件。无法隔离电子邮件本身。

<article>
    <table>
        <div class="infoStats__description">
            <div class>
                <div class>
                    <div class>
                        <div>
                            <p>???</p>
                            <p>
                                "CONTACT: "
                                <a href="mailto:[email protected]">
                                [email protected]</a>
                            </p>
                        </div>
                    </div>
                </div>
                <a class="truncatedUser_Description"
                href="#">Show More</a>
            </div>
        <div>

到目前为止是我的代码:

from bs4 import BeautifulSoup
import requests
import re

url="https://soundcloud.com/camcontrast"

html_content = requests.get(url).text

soup = BeautifulSoup(html_content, "lxml")

for url in soup.find_all('p'):
    print(url.string)

这是输出:

JavaScript is disabled
You need to enable JavaScript to use SoundCloud
CAM CONTRA$T
BROWARD
???

CONTACT: [email protected]
None
Sorry! Something went wrong
Is your network connection unstable or browser outdated?
None

电子邮件是我唯一想要返回的东西。

python web-scraping beautifulsoup soundcloud
1个回答
0
投票
[电子邮件位于<p>中,带有itemprop="description"
© www.soinside.com 2019 - 2024. All rights reserved.