马里# 2024-04-10 12:00:00 # 2024-04-10 12:00:00 # https://apnews.com/article/trump-hush-money-trial-jury-selection-4b8a0a0a0a0a0a0a0a0a0a0a0a0a0a0 import json import requests from bs4 import BeautifulSoup def scrape_article(url): try: # Send a GET request to the URL response = requests.get(url) response.raise_for_status() # Raise an error for bad status codes # Parse the HTML content using BeautifulSoup soup = BeautifulSoup(response.text, 'html.parser') # Extract the title title = soup.find('h1').get_text() if soup.find('h1') else 'No title found' # Extract the article body article_body = [] # This selector might need adjustment based on the actual HTML of the article for paragraph in soup.find_all('p'): article_body.append(paragraph.get_text()) # Combine all paragraphs into a single text article_text = '/n'.join(article_body) # Return the extracted data as a dictionary return { 'title': title, 'article_text': article_text, 'url': url } except Exception as e: print(f"Error scraping {url}: {e}") return None # Example usage if __name__ == "__main__": article_url = "https://apnews.com/article/trump-hush-money-trial-jury-selection-4b8a0a0a0a0a0a0a0a0a0a0a0a0a0a0" article_data = scrape_article(article_url) if article_data: print(json.dumps(article_data, indent=2))
Reuters
路透巴马科8月5日电 - 据马里国家媒体报道,马里政府周一晚表示,与伊斯兰国有关联的武装分子已释放了1月份被绑架的四名摩洛哥卡车司机,这凸显了两国间日益增强的情报合作。
这些男子及其三辆卡车失踪于1月份,当时他们在没有护送的情况下从布基纳法索的多里穿越到尼日尔的泰拉,该地区以圣战分子威胁闻名,一位外交消息人士当时表示。路透每日简报为您提供开始一天所需的所有新闻。在此注册。
广告 · 继续滚动周一晚间的国家媒体播出的画面中,他们与马里军政府领导人阿西米·戈伊塔一同出现,报道称他们已于周日获释。
由军政府领导的布基纳法索、尼日尔和马里正在与与基地组织和伊斯兰国有关联的武装团体作战,这些团体十多年来一直在破坏西非萨赫勒地区的稳定。这三个国家均已停止与法国及其他西方国家的防务合作,转而寻求俄罗斯的军事支持。去年,它们宣布退出西非国家经济共同体(ECOWAS),增加了外交孤立的风险。
广告 · 继续滚动通过路透AI获取本故事的关键点与此同时,摩洛哥与这三个内陆国家的关系更加紧密。
4月,布基纳法索、尼日尔和马里的外交部长批准了一项倡议,通过摩洛哥的大西洋港口为他们提供全球贸易通道。摩洛哥还进行了调解,确保在12月释放了四名在布基纳法索被关押了一年的法国国民。马里国家媒体报道,周日四名卡车司机的获释是马里和摩洛哥安全与情报部门合作的结果。
- 建议主题:
- 非洲