Quantcast
Channel: BlogoSfera » blocks
Viewing all articles
Browse latest Browse all 15

Select multiple values inside HTML tags with BeautifulSoup

$
0
0

I scraped a HTML page with multiple blocks of code like the following: <div data-pnref="all" class="clearfix _5qo4"> <a data-hovercard="/ajax/hovercard/user.php?id=671948073& amp;extragetparams=%7B%22hc_location%22%3A%22friends_tab%22%7D" ... /> I would like to retrieve the value of data-hovercard, and in particular the id in the URL: “671948073”. I tried both findAll and select in the BeautifulSoup module, but so far unsuccessfully.

The post Select multiple values inside HTML tags with BeautifulSoup appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 15

Trending Articles