Skip to content

Commit

Permalink
fix url error
Browse files Browse the repository at this point in the history
  • Loading branch information
gsxhnd committed Jun 27, 2023
1 parent 6727347 commit dc5b510
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/cmd/crawl_jav.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ var javStarCodeFromDirCmd = &cli.Command{
var logger = utils.GetLogger()

client, err := crawl.NewCrawlClient(logger, crawl.CrawlOptions{
Proxy: c.String("proxy"),
DestPath: c.String("output"),
PrefixCode: c.String("prefix-code"),
Proxy: c.String("proxy"),
DestPath: c.String("output"),
})
if err != nil {
logger.Panic("client init error: " + err.Error())
Expand Down
8 changes: 2 additions & 6 deletions src/crawl/javbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (cc *crawlClient) StartCrawlJavbusMovieByFilepath(inputPath string) error {
fileExt := filepath.Ext(filename)
for _, b := range videoExt {
if fileExt == b {
q.AddURL(cc.javbusUrl + filename)
q.AddURL(cc.javbusUrl + "/" + filename)
}
}
return nil
Expand All @@ -239,12 +239,8 @@ func (cc *crawlClient) StartCrawlJavbusMovieByFilepath(inputPath string) error {
}

cc.collector.OnRequest(func(r *colly.Request) {
cc.logger.Info("Visiting" + r.URL.String())
cc.logger.Info("Visiting: " + r.URL.String())
})

if cc.downloadMagent {
cc.collector.OnHTML("body", cc.getJavMovieMagnetByJavbus)
}
cc.collector.OnHTML(".container", cc.getJavMovieInfoByJavbus)

q.Run(cc.collector)
Expand Down

0 comments on commit dc5b510

Please sign in to comment.