Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ClickShare.download.recipe #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paul-cossey
Copy link
Contributor

Hi, Folks

The ClickShare download recipe is currently failing with

URLTextSearcher: Error: No match found on URL: https://www.barco.com/bin/barco/tde/downloadUrl.json?fileNumber=R3306192&tdeType=3

This PR adds some headers and curl options to URLTextSearcher

Output from a successful -vv run

 autopkg run -vv ClickShare.download.recipe 
**load_recipe time: 0.0008918340026866645
Processing ClickShare.download.recipe...
WARNING: ClickShare.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
com.github.smithjw.processors/FriendlyPathDeleter
{'Input': {'fail_deleter_silently': True,
           'path_list': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/downloads/ClickShare.zip'}}
FriendlyPathDeleter: Deleted /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/downloads/ClickShare.zip
{'Output': {}}
URLTextSearcher
{'Input': {'curl_opts': ['-b ClickShare.txt -L'],
           're_pattern': '"downloadUrl":\\"(https://.+)",',
           'request_headers': {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                               'Accept-Encoding': 'gzip, deflate, br',
                               'Accept-Language': 'en-GB,en;q=0.9',
                               'Priority': 'u=0, i',
                               'Sec-Fetch-Dest': 'document',
                               'Sec-Fetch-Mode': 'navigate',
                               'Sec-Fetch-Site': 'none',
                               'user-agent': 'Mozilla/5.0 (Macintosh; Intel '
                                             'Mac OS X 10_15_7) '
                                             'AppleWebKit/605.1.15 (KHTML, '
                                             'like Gecko) Version/17.4.1 '
                                             'Safari/605.1.15'},
           'result_output_var_name': 'match',
           'url': 'https://www.barco.com/bin/barco/tde/downloadUrl.json?fileNumber=R3306192&tdeType=3'}}
URLTextSearcher: Found matching text (match): https://securefiles.barco.com/tde/Active/SoftwareFiles/ApplicationSoftware/R3306192_61_ApplicationSw.zip?t=WHl9DZ1AyCFNSHuIBiFkFc9vY%2fbE%2fHZ36Q6Ub%2bVc4J0%3d&e=1734036613421&sv=2024-11-04&spr=https&st=2024-12-12T20%3A45%3A13Z&se=2024-12-12T20%3A50%3A13Z&sr=f&sp=r&sig=v23FByTSjPgrLdHx%2B7hgsZWkLV7fOPtEM3WITCVjYQs%3D
{'Output': {'match': 'https://securefiles.barco.com/tde/Active/SoftwareFiles/ApplicationSoftware/R3306192_61_ApplicationSw.zip?t=WHl9DZ1AyCFNSHuIBiFkFc9vY%2fbE%2fHZ36Q6Ub%2bVc4J0%3d&e=1734036613421&sv=2024-11-04&spr=https&st=2024-12-12T20%3A45%3A13Z&se=2024-12-12T20%3A50%3A13Z&sr=f&sp=r&sig=v23FByTSjPgrLdHx%2B7hgsZWkLV7fOPtEM3WITCVjYQs%3D'}}
URLDownloader
{'Input': {'curl_opts': ['-b ClickShare.txt -L'],
           'filename': 'ClickShare.zip',
           'request_headers': {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                               'Accept-Encoding': 'gzip, deflate, br',
                               'Accept-Language': 'en-GB,en;q=0.9',
                               'Priority': 'u=0, i',
                               'Sec-Fetch-Dest': 'document',
                               'Sec-Fetch-Mode': 'navigate',
                               'Sec-Fetch-Site': 'none',
                               'user-agent': 'Mozilla/5.0 (Macintosh; Intel '
                                             'Mac OS X 10_15_7) '
                                             'AppleWebKit/605.1.15 (KHTML, '
                                             'like Gecko) Version/17.4.1 '
                                             'Safari/605.1.15'},
           'url': 'https://securefiles.barco.com/tde/Active/SoftwareFiles/ApplicationSoftware/R3306192_61_ApplicationSw.zip?t=WHl9DZ1AyCFNSHuIBiFkFc9vY%2fbE%2fHZ36Q6Ub%2bVc4J0%3d&e=1734036613421&sv=2024-11-04&spr=https&st=2024-12-12T20%3A45%3A13Z&se=2024-12-12T20%3A50%3A13Z&sr=f&sp=r&sig=v23FByTSjPgrLdHx%2B7hgsZWkLV7fOPtEM3WITCVjYQs%3D'}}
URLDownloader: No value supplied for prefetch_filename, setting default value of: False
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
URLDownloader: Storing new Last-Modified header: Wed, 04 Dec 2024 13:08:46 GMT
URLDownloader: Storing new ETag header: "0x8DD1464C97A3A1B"
URLDownloader: Downloaded /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/downloads/ClickShare.zip
{'Output': {'download_changed': True,
            'etag': '"0x8DD1464C97A3A1B"',
            'last_modified': 'Wed, 04 Dec 2024 13:08:46 GMT',
            'pathname': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/downloads/ClickShare.zip',
            'url_downloader_summary_result': {'data': {'download_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/downloads/ClickShare.zip'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
Unarchiver
{'Input': {'destination_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack'}}
Unarchiver: No value supplied for USE_PYTHON_NATIVE_EXTRACTOR, setting default value of: False
Unarchiver: Guessed archive format 'zip' from filename ClickShare.zip
Unarchiver: Unarchived /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/downloads/ClickShare.zip to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack
{'Output': {}}
FileFinder
{'Input': {'pattern': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack/*.dmg'}}
FileFinder: No value supplied for find_method, setting default value of: glob
FileFinder: Found file match: '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack/ClickShare_Setup.dmg' from globbed '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack/*.dmg'
FileFinder: Basename match: 'ClickShare_Setup.dmg'
{'Output': {'found_basename': 'ClickShare_Setup.dmg',
            'found_filename': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack/ClickShare_Setup.dmg'}}
CodeSignatureVerifier
{'Input': {'input_path': '/Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack/ClickShare_Setup.dmg/ClickShare.app',
           'requirement': 'identifier "com.barco.clickshare.updater" and '
                          'anchor apple generic and certificate '
                          '1[field.1.2.840.113635.100.6.2.6] /* exists */ and '
                          'certificate leaf[field.1.2.840.113635.100.6.1.13] '
                          '/* exists */ and certificate leaf[subject.OU] = '
                          'P6CDJZR997'}}
CodeSignatureVerifier: Mounted disk image /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/unpack/ClickShare_Setup.dmg
CodeSignatureVerifier: Verifying code signature...
CodeSignatureVerifier: Deep verification enabled...
CodeSignatureVerifier: Strict verification not defined. Using codesign defaults...
CodeSignatureVerifier: /private/tmp/dmg.mKhRYu/ClickShare.app: valid on disk
CodeSignatureVerifier: /private/tmp/dmg.mKhRYu/ClickShare.app: satisfies its Designated Requirement
CodeSignatureVerifier: /private/tmp/dmg.mKhRYu/ClickShare.app: explicit requirement satisfied
CodeSignatureVerifier: Signature is valid
{'Output': {}}
Receipt written to /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/receipts/ClickShare.download-receipt-20241212-204530.plist

The following new items were downloaded:
    Download Path                                                                                                    
    -------------                                                                                                    
    /Users/paul.cossey/Library/AutoPkg/Cache/com.github.moofit-recipes.download.ClickShare/downloads/ClickShare.zip

@smaddock
Copy link

I am still getting the No match found error using this. Your cURL options reference a cookie file ClickShare.txt but there is no such file attached, perhaps that is why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants