ฉันยังใหม่กับการเขียนโปรแกรมและกำลังเรียนรู้ Python ผ่านการขูดเว็บ สิ่งที่ฉันพยายามทำคือจับบรรทัดด้านล่างจากไซต์ที่แสดงอยู่ใน URL ของฉัน:
<a class="" href="https://www.adweek.com?paged=776%3Fs%3Dinterpublic&orderby=date&s=interpublic">776</a>
แต่ดูเหมือนฉันไม่สามารถไปที่นั่นได้ มันจะส่งคืนข้อมูลการแบ่งหน้าบรรทัดแรกเท่านั้นและฉันไม่เข้าใจว่าทำไม ความช่วยเหลือใด ๆ ที่จะได้รับการชื่นชมอย่างมาก
import requests
from bs4 import BeautifulSoup
url = 'https://www.adweek.com/?s=interpublic&orderby=date'
req = requests.get(url)
soup = BeautifulSoup(req.content, 'html.parser')
k =soup.find_all('div', {'class':'pagination-centered'})
ส่งคืนเท่านั้น --
[<div class="pagination-centered"><ul class="pagination">
<li><span aria-current="page" class="current">1</span></li></ul></div>]
ขอบคุณเซธ