Scrape all Naver Video Results using pagination in Python
Using [`parsel`](https://parsel.readthedocs.io/):

```python
import requests, json 
from parsel import Selector 
 
params = { 
    "start": 0,            # page number 
    "display": "48",       # videos to display. Hard limit. 
    "query": "minecraft",  # search query 
    "where": "video",      # Naver videos search engine  
    "sort": "rel",         # sorted as you would see in the browser 
    "video_more": "1"      # required to receive a JSON data 
} 
 
headers = { 
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36", 
} 
 
video_results = [] 
 
html = requests.get("https://s.search.naver.com/p/video/search.naver", params=params, headers=headers, timeout=30) 
json_data = json.loads(html.text.replace("( {", "{").replace("]})", "]}")) 
html_data = json_data["aData"] 
 
while params["start"] &lt;= int(json_data["maxCount"]): 
    for result in html_data: 
        selector = Selector(result) 
 
        for video in selector.css(".video_bx"): 
            title = video.css(".text").xpath("normalize-space()").get().strip() 
            link = video.css(".info_title::attr(href)").get() 
            thumbnail = video.css(".thumb_area img::attr(src)").get() 
            channel = video.css(".channel::text").get() 
            origin = video.css(".origin::text").get() 
            video_duration = video.css(".time::text").get() 
            views = video.css(".desc_group .desc:nth-child(1)::text").get() 
            date_published = video.css(".desc_group .desc:nth-child(2)::text").get() 
 
            video_results.append({ 
                "title": title, 
                "link": link, 
                "thumbnail": thumbnail, 
                "channel": channel, 
                "origin": origin, 
                "video_duration": video_duration, 
                "views": views, 
                "date_published": date_published 
            }) 
 
    params["start"] += 48 
    html = requests.get("https://s.search.naver.com/p/video/search.naver", params=params, headers=headers, timeout=30) 
    html_data = json.loads(html.text.replace("( {", "{").replace("]})", "]}"))["aData"] 
 
print(json.dumps(video_results, indent=2, ensure_ascii=False)) 
Output:

[ 
  { 
    "title": "Minecraft : 🏰 How to build a Survival Castle Tower house", 
    "link": "https://www.youtube.com/watch?v=iU-xjhgU2vQ", 
    "thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiU-xjhgU2vQ%2Fmqdefault.jpg&amp;type=ac612_350", 
    "channel": "소피 Sopypie", 
    "origin": "Youtube", 
    "video_duration": "25:27", 
    "views": "126", 
    "date_published": "1일 전" 
  }, 
  { 
    "title": "조금 혼란스러울 수 있는 마인크래프트 [ Minecraft ASMR Tower ]", 
    "link": "https://www.youtube.com/watch?v=y8x8oDAek_w", 
    "thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fy8x8oDAek_w%2Fmqdefault.jpg&amp;type=ac612_350", 
    "channel": "세빈 XEBIN", 
    "origin": "Youtube", 
    "video_duration": "00:58", 
    "views": "1,262", 
    "date_published": "2021.11.13." 
  } 
] 
```

Using [`playwright`](https://playwright.dev/python/) browser automation:

```python
from playwright.sync_api import sync_playwright 
import json 
 
with sync_playwright() as p: 
    browser = p.chromium.launch(headless=False) 
    page = browser.new_page() 
    page.goto("https://search.naver.com/search.naver?where=video&amp;query=minecraft") 
 
    video_results = [] 
 
    not_reached_end = True 
    while not_reached_end: 
        page.evaluate("""let scrollingElement = (document.scrollingElement || document.body); 
                                 scrollingElement.scrollTop = scrollingElement scrollHeight;""") 
         
        if page.locator("#video_max_display").is_visible(): 
            not_reached_end = False 
 
    for index, video in enumerate(page.query_selector_all(".video_bx"), start=1): 
        title = video.query_selector(".text").inner_text() 
        link = video.query_selector(".info_title").get_attribute("href") 
        thumbnail = video.query_selector(".thumb_area img").get_attribute("src") 
        channel = None if video.query_selector(".channel") is None else video.query_selector(".channel").inner_text() 
        origin = video.query_selector(".origin").inner_text() 
        video_duration = video.query_selector(".time").inner_text() 
        views = video.query_selector(".desc_group .desc:nth-child(1)").inner_text() 
        date_published = None if video.query_selector(".desc_group .desc:nth-child(2)") is None else \ 
            video.query_selector(".desc_group .desc:nth-child(2)").inner_text() 
 
        video_results.append({ 
            "position": index, 
            "title": title, 
            "link": link, 
            "thumbnail": thumbnail, 
            "channel": channel, 
            "origin": origin, 
            "video_duration": video_duration, 
            "views": views, 
            "date_published": date_published 
        }) 
 
    print(json.dumps(video_results, indent=2, ensure_ascii=False)) 
 
    browser.close() 
```

Output:

```json
[ 
  { 
    "position": 1, 
    "title": "Minecraft : 🏰 How to build a Survival Castle Tower house", 
    "link": "https://www.youtube.com/watch?v=iU-xjhgU2vQ", 
    "thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiU-xjhgU2vQ%2Fmqdefault.jpg&amp;type=ac612_350", 
    "channel": "소피 Sopypie", 
    "origin": "Youtube", 
    "video_duration": "25:27", 
    "views": "재생수126", 
    "date_published": "20시간 전" 
  }, 
  { 
    "position": 1008, 
    "title": "Titanic [Minecraft] V3 | 타이타닉 [마인크래프트] V3", 
    "link": "https://www.youtube.com/watch?v=K39joThAoC0", 
    "thumbnail": "https://search.pstatic.net/common/?src=https%3A%2F%2Fi.ytimg.com%2Fvi%2FK39joThAoC0%2Fmqdefault.jpg&amp;type=ac612_350", 
    "channel": "나이아Naia", 
    "origin": "Youtube", 
    "video_duration": "02:40", 
    "views": "재생수22", 
    "date_published": "2021.11.11." 
  } 
] 
```

If you need a more in-depth explanation, you can visit the blog post at SerpApi: https://serpapi.com/blog/scrape-all-naver-video-results-using-pagination-in-python/#full_code