79303934

Date: 2024-12-23 18:41:38
Score: 0.5
Natty:
Report link

I managed to solve the problem by adding:

no_bs = html_content.replace('\\"', '"')

which removes what appears to be back spaces that are not replicated when copying and pasting the html code manually. Making the final code looks like this:

import re
import requests
url = "https://asuracomic.net/series/bloodhounds-regression-instinct-2d0edc16/chapter/59"
response = requests.get(url)
html_content = response.text
no_bs = html_content.replace('\\"', '"')
# Regex pattern
pattern = r'{"order":\d+,"url":"(https:[^"]+\.webp)"}'

# Find matches
matches = re.findall(pattern, no_bs)

# Print matches
for match in matches:
    print(match)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Addoodi