简体   繁体   English

使用python从网页中抓取广告

[英]Scraping advertisements from a web page using python

How can I scrape ads (eg Banners) from a dynamically loaded web page - like AdblockPlus - using Python?如何使用 Python 从动态加载的网页(例如 AdblockPlus)中抓取广告(例如横幅)?

I want to exclude ads from a web page to filter it.我想从网页中排除广告以对其进行过滤。

You can use BeautifulSoup to scrape webpage.您可以使用BeautifulSoup抓取网页。

You need to install the package and just import it您需要安装软件包并导入它

Like this from bs4 import BeautifulSoup像这样from bs4 import BeautifulSoup

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM