馬裏# 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月釋放了四名在布基納法索被關押了一年的法國國民。馬裏國家媒體報道,週日四名卡車司機的獲釋是馬裏和摩洛哥安全與情報部門合作的結果。
- 建議主題:
- 非洲