Welcome to the ICM Forum. If you have an account but have trouble logging in, or have other questions, see THIS THREAD.
NOTE: Board emails should be working again. Information on forum upgrade and style issues.
Podcast: Talking Images (Episode 22 released November 17th * EXCLUSIVE * We Are Mentioned in a Book!!! Interview with Mary Guillermin on Rapture, JG & More)
Polls: Coming of Age (Results), DtC - Ratings (Results), 1933 (May 12th), 1970s (May 29th)
Challenges: Japan, Mystery/Thriller, Western
Film of the Week: Akage, June nominations (May 28th)

Posting Links on iCM title comments

Post Reply
User avatar
joachimt
Donator
Posts: 33889
Joined: February 16th, 2012, 7:00 am
Location: Netherlands
Contact:

#881

Post by joachimt »

Torgo wrote: May 4th, 2021, 3:49 am https://www.icheckmovies.com/movies/int ... /comments/

Older link dead
removed
ICM-profile
Fergenaprido: "I find your OCD to be adorable, J"
User avatar
Torgo
Posts: 2918
Joined: June 30th, 2011, 6:00 am
Location: Germany
Contact:

#882

Post by Torgo »

User avatar
joachimt
Donator
Posts: 33889
Joined: February 16th, 2012, 7:00 am
Location: Netherlands
Contact:

#883

Post by joachimt »

removed
ICM-profile
Fergenaprido: "I find your OCD to be adorable, J"
User avatar
Ebbywebby
Posts: 4070
Joined: September 10th, 2012, 6:00 am
Location: Orange County, CA
Contact:

#884

Post by Ebbywebby »

pitchorneirda or monk-time: Would it be easy to whip out a script that would search a given set of ICM movie pages for films that have no runtime on ICM but have a runtime on IMDb?

You know, an algorithm something like....

Loop from https://www.icheckmovies.com/movies/?pa ... rt=runtime through https://www.icheckmovies.com/movies/?pa ... rt=runtime (where other numbers could be substituted for "1" and "300" if desired)

Then examine the 25 films found on each page to see if they have IMDb runtimes, and output that subset of films.

And it would be instructive for me to examine the code.

?
User avatar
Torgo
Posts: 2918
Joined: June 30th, 2011, 6:00 am
Location: Germany
Contact:

#885

Post by Torgo »

This link sure as hell dead after 10 years:
https://www.icheckmovies.com/movies/shirley+valentine/
User avatar
Fergenaprido
Donator
Posts: 5469
Joined: June 3rd, 2014, 6:00 am
Location: Canada
Contact:

#886

Post by Fergenaprido »

Torgo wrote: Yesterday, 3:42 am This link sure as hell dead after 10 years:
https://www.icheckmovies.com/movies/shirley+valentine/
Removed.
🧚‍♂️🦫
User avatar
monk-time
Posts: 1424
Joined: March 23rd, 2015, 6:00 am
Contact:

#887

Post by monk-time »

Ebbywebby wrote: May 6th, 2021, 10:19 pm pitchorneirda or monk-time: Would it be easy to whip out a script that would search a given set of ICM movie pages for films that have no runtime on ICM but have a runtime on IMDb?
Yeah, should be easy enough. Gimme an hour or two to cook something up.
User avatar
monk-time
Posts: 1424
Joined: March 23rd, 2015, 6:00 am
Contact:

#888

Post by monk-time »

Ebbywebby wrote: May 6th, 2021, 10:19 pm pitchorneirda or monk-time: Would it be easy to whip out a script that would search a given set of ICM movie pages for films that have no runtime on ICM but have a runtime on IMDb?

You know, an algorithm something like....

Loop from https://www.icheckmovies.com/movies/?pa ... rt=runtime through https://www.icheckmovies.com/movies/?pa ... rt=runtime (where other numbers could be substituted for "1" and "300" if desired)

Then examine the 25 films found on each page to see if they have IMDb runtimes, and output that subset of films.

And it would be instructive for me to examine the code.

?
Here you go. Should be more than enough to get you started. If you uncomment two lines at the end it will only report movies that you look for, but then it'll be difficult to know where the script is right now.

Three nice-to-haves that I didn't have time to add are logging (so that you can have a file with detailed progress of the script with all HTTP requests and their response errors), better error handling (I immediately stumbled upon an ICM page with a dead IMDb link) and writing results to a .csv file instead of stdout. But I don't plan to work on it any further myself rn.
User avatar
Ebbywebby
Posts: 4070
Joined: September 10th, 2012, 6:00 am
Location: Orange County, CA
Contact:

#889

Post by Ebbywebby »

"better error handling (I immediately stumbled upon an ICM page with a dead IMDb link)"

Ha. I already had anticipated that being a stumbling block. Those damn orphans.

I"m sorry, I'll need more help because I'm not experienced with Python. So, I need to run this via a command line in Terminal (on my Mac)? No? Except that I saved the code to my desktop, tried entering "python desktop/runtime.py" and got this:

File "desktop/runtime.py", line 10
def fetch_pages(url: str, page_start: int, page_end: int) -> Iterable[Tag]:
^ [positioned under the colon following "url"]
SyntaxError: invalid syntax


So I must have done wrong.

And I'm trying to understand where I would change the parameters of the loop to check different series of ICM pages. Is it in this line?

for page in fetch_pages('https://www.icheckmovies.com/movies/?sort=runtime', 25524, 25524 + 1):

Where does "25524" come from? Which pages would this function check, as is?

Whatever you can explain about the code would be wonderful. :( It appears the main section of code starts with "def main," and this code calls upon the five functions defined above it? And it's using Python libraries called BeautifulSoup and Tag?

How exactly does this code pull out the runtime, out of all the code scraped from a given IMDb page? Somewhere around "titleBar time"?

This is most frustrating. I'm not used to feeling dumb. Perhaps you should just send me a private message rather than sending this public thread off-course.

Thanks for your labor, in any case!
User avatar
monk-time
Posts: 1424
Joined: March 23rd, 2015, 6:00 am
Contact:

#890

Post by monk-time »

Sure, I've sent you a PM.
Post Reply