Skip to content

Commit

Permalink
Fix Stillsfrmfilms scraper
Browse files Browse the repository at this point in the history
Signed-off-by: Yann Defretin <yann@defret.in>
  • Loading branch information
kinoute committed Sep 12, 2024
1 parent 4b8f572 commit f6f3fc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/credits.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ package config
const AUTHOR string = "Yann Defretin"

// VERSION stores the actual version of the app
const VERSION string = "0.3.0"
const VERSION string = "0.3.1"
4 changes: 2 additions & 2 deletions websites/stillsfrmfilms.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ func StillsFrmFilmsScraper(scraper **colly.Collector, options *config.Options) {
})

// Look for links on thumbnails that redirect to a "largest" version.
movieScraper.OnHTML("div.photo-inner dl.gallery-item a[href*=stills] img[src*=files]", func(e *colly.HTMLElement) {
movieScraper.OnHTML("div.photo-inner dl.gallery-item a[href*=stills] img[src*=uploads]", func(e *colly.HTMLElement) {

movieImageURL := e.Request.AbsoluteURL(e.Attr("src"))
movieImageURL := e.Request.AbsoluteURL(e.Attr("data-orig-file"))

// Use regexp to remove potential GET parameters from the URL
// regarding the resolution of the displayed image.
Expand Down
2 changes: 1 addition & 1 deletion websites/stillsfrmfilms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestStillsFrmNormalMoviePage(t *testing.T) {
doc := utils.GetHTMLCode("https://stillsfrmfilms.wordpress.com/2012/09/17/25th-hour/")

// We should find many links to high-quality images
numLargeImages := doc.Find("div.photo-inner dl.gallery-item a[href*=stills] img[src*=files]").Length()
numLargeImages := doc.Find("div.photo-inner dl.gallery-item a[href*=stills] img[src*=uploads]").Length()
if numLargeImages != 55 {
log.Fatalln("Number of links to large images is different than 55:", numLargeImages)
}
Expand Down

0 comments on commit f6f3fc9

Please sign in to comment.