V
V
VuztreeCalan2019-09-08 20:59:04
Python
VuztreeCalan, 2019-09-08 20:59:04

How to parse URL inside script in python?

I'm trying to get pictures from this page , I use session.get, I see the following:
5d753bf60befb810573521.png
It doesn't seem to matter, the code contains links to all the highres, but all but the first one are inside the script, and the script itself looks like this: The
5d753c8445e56838320974.png
necessary links, respectively, lie far inside this line.
Now I use soup.find_all('script'), among the output I find the script I need, so now I have two questions, how to find only one script and not all at once, and are there any ways to pull URLs out of a huge string other than using scary regulars?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AWEme, 2019-09-08
@VuztreeCalan

I remember I gave the code in the last answer .
https://www.artstation.com/projects/o1eqm.json
This link has it all.

S
smsi, 2019-09-08
@smsi

It's not easier to look for something like " https://cdna.artstation.com/p/assets/images/images/ " - start, ".jpg" - end.
You don't need any scary regular expressions
All the pictures on these links and pull out

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question