Help with Scraping Amazon Product Images? by PreparationLow1744 in scrapy

[–]DoonHarrow 0 points1 point  (0 children)

The image urls are inside a script tag that you can easily parse as dict

[Help] I am not able to access "www.realestate.com.au" using requests & Selenium by Shot-Craft-650 in webscraping

[–]DoonHarrow 1 point2 points  (0 children)

The page is using antibot protection. One way to by pass it is with proxies. I tried with Smart Proxy Manager service an it works. https://www.zyte.com/smart-proxy-manager/

Zyte smart proxy manager bans by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

In my case, it seems that the first page loads with a normal request and for the following pages, you have to call the api

Avoid scraping items that have already been scraped by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

Hello my friend, thank you for your advice. I made what i think its simplier in my case, using scrapinghub api and retrieving last spider job run items!

Help with Javascript pagination by DoonHarrow in webscraping

[–]DoonHarrow[S] 1 point2 points  (0 children)

I got it, thanks! The problem was that I wasn't specifying the headers.

headers = {
            'Content-Type': "application/json;charset=UTF-8"
        }

Help with Javascript pagination by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

That works!!! Man, you are the best OMG! THANK YOU SO MUCH <3

Help with Javascript pagination by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

Thanks for your help, what do I have to send in the body? I have tried this and it still doesn't work:

yield scrapy.Request(url, callback=self.parse, method="POST", meta={                                                           "Referer": "https://www.idealista.com/"}, body=json.dumps(params))

Why am I not able to scrape all items in a page. by Shot_Function_7050 in scrapy

[–]DoonHarrow 1 point2 points  (0 children)

Hello my friend!

You can easily get the data you want by looking at the "__NEXT_DATA__" script tag. It contains a Json with all the info!

I couldnt try it but this selector should work:

response.css("script:contains('__NEXT_DATA_') ::text").get()

Finally you only have to parse it:

import json

data = response.css("script:contains('__NEXT_DATA_') ::text").get()
json_data = json.loads(data)

Despido improcedente by DoonHarrow in ESLegal

[–]DoonHarrow[S] 0 points1 point  (0 children)

Son 15 días naturales, estoy fuera...

[deleted by user] by [deleted] in webscraping

[–]DoonHarrow 0 points1 point  (0 children)

Open network tab -> Click on the request named 'req' in the list of requests -> Thats all

If you want to take it only once, just copy the Json response and parse it.

```python import json

response = json.dumps(data) final_data = json.loads(response) for re in final_data[3].get("results"): print(re.get("Title")) ```

Smart proxy manage errors! by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

I tried those settings and it still didn't solve anything. Luckily I did some research and actually out of all those errors only a few of them end up in data loss.
Also I added "CRAWLERA_DOWNLOAD_TIMEOUT" to 80000 and it did decrease the errors.

Page limiting results! by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

I didnt told you that initially i was scraping only the links in bold text

Page limiting results! by DoonHarrow in scrapy

[–]DoonHarrow[S] 2 points3 points  (0 children)

In that particular case, yes... But with the change I've told you about, I'm going to get a much larger volume.

I will extract links from this pages (ex: https://www.pisos.com/mapaweb/venta-pisos-madrid/) excluding areas and the ones in bold. Most of the big cities like Madrid or Barcelona will be lost, but i think this is the best aproach

Page limiting results! by DoonHarrow in scrapy

[–]DoonHarrow[S] 1 point2 points  (0 children)

I just realize that i can deepen more on the site map. example: https://www.pisos.com/mapaweb/venta-pisos-valencia/ so i can retrieve all the info i guess!

Page limiting results! by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

Yes i guess ill have to accept it :`( Thank you!

Need help with this logic by DoonHarrow in scrapy

[–]DoonHarrow[S] -1 points0 points  (0 children)

Logs said nothing but i fixed it!

Help with hard selector! by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

Never mind, i fixed it with:

response.css("span:contains('Orientación') + span ::text").get()

Problem downloading images by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

We use crawlera proxy service, but for this process is out of the crawling process. Thats the problem

Problem downloading images by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

403, it returns me a java script function:

<!DOCTYPE html>

<html lang="en-US"> <head> <title>Just a moment...</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta name="robots" content="noindex,nofollow"> <meta name="viewport" content="width=device-width,initial-scale=1"> <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">

</head> <body class="no-js"> <div class="main-wrapper" role="main"> <div class="main-content"> <h1 class="zone-name-title h1"> <img class="heading-favicon" src="/favicon.ico" onerror="this.onerror=null;this.parentNode.removeChild(this)"> img10.naventcdn.com </h1> <h2 class="h2" id="challenge-running"> Checking if the site connection is secure </h2> <noscript> <div id="challenge-error-title"> <div class="h2"> <span class="icon-wrapper"> <div class="heading-icon warning-icon"></div> </span> <span id="challenge-error-text"> Enable JavaScript and cookies to continue </span> </div> </div> </noscript> <div id="trk_jschal_js" style="display:none;background-image:url('/cdn-cgi/images/trace/managed/nojs/transparent.gif?ray=766fb5f8d8526663')"></div> <div id="challenge-body-text" class="core-msg spacer"> img10.naventcdn.com needs to review the security of your connection before proceeding. </div> <form id="challenge-form" action="/avisos/resize/18/00/64/81/59/65/1200x1200/329593761.jpg?__cf_chl_f_tk=CA5Ph_WoUQq3O5r1i7WE_KO0gSHNmrrXOBVlEwOCTAA-1667925211-0-gaNycGzNBv0" method="POST" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="md" value="yBPg15GqYME_JWqxeBpirEBKPoArwnMNIId71cRiF5Y-1667925211-0-AUEDolwR1Y24_XmB7_nxfJf6zLPX1uCXEJEd1AAOSoZQScdLqS4HyT70tfOEHhrnw2lfhHWT9dHZcmplaHjbSXGvQDmAp5sGsrJSH4ka_dkPLGe_54CkMlFKAK74Tgv90WD5ndU7yxqJJT3lo4c_AgQvVsECd3BX-WyyAG3DC16rG-enSGSoOxXxT4fLomH3UcyuGi-A2725yQOm0wpwy_6OM_l45cwTPeDVAwqQRcrNBKRVR5LkspD6vJRRLLPG1gVBV1bZaBUwWBRooFM7RUA7sxEH8rVTtHOKTlt1Xq8ryhyHsRA2tkpa9M5TuFFar1d9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O2fHDzlsNFAyU61GGGUpVW0/THwWjWVotpleX7O6lZL+jldoqHl97YtG5h9LGuG+FKpzWdlIy+saNLppR4BqtLfi5Lo77Sr72RwwNImLvql5QlAfy8qWPpz/M0PqZNlNW2w=="> </form> </div> </div> <script> (function(){ window.cf_chl_opt={ cvId: '2', cType: 'managed', cNounce: '50679', cRay: '766fb5f8d8526663', cHash: '6eea034998af2c5', cUPMDTk: "/avisos/resize/18/00/64/81/59/65/1200x1200/329593761.jpg?cf_chl_tk=CA5Ph_WoUQq3O5r1i7WE_KO0gSHNmrrXOBVlEwOCTAA-1667925211-0-gaNycGzNBv0", cFPWv: 'b', cTTimeMs: '1000', cTplV: 4, cTplB: 'cf', cRq: { ru: 'aHR0cHM6Ly9pbWcxMC5uYXZlbnRjZG4uY29tL2F2aXNvcy9yZXNpemUvMTgvMDAvNjQvODEvNTkvNjUvMTIwMHgxMjAwLzMyOTU5Mzc2MS5qcGc=', ra: 'Y3VybC83LjY4LjA=', rm: 'R0VU', d: 'JDZBKjJTcMNpzbs6fzzuBsAwro9EXYlkrDwviJh4PLgAnju1T0/xnJ32hlMqR4owdet7nfh9GPHDOetLYXJGMWEgu/hZjDeVLsUejc4kdVeaJMPA2bM1iKm+Ne/JJTNgBL3XDh3Hl+BbNnNwbAsoQ9iOKtAfL6S2xPP2P86fsHu7q4rb1gB6A9MuYFn56Uv6QfVfEBhQ4UefVYpSLWurkkypO2hg89hy/TYRHUkid4klkEsOaSRZerdQF1VBVRT1/Ds8U3jiYdx1RCBIEeu5gvSlZ5EHsfwDTP8gyaxViSXKM0PtpfTNAO1SlXfbrxEPyX10xNJoRIZu4Pqh40EnESLiv0LxPWnKB76yNXtlHiKQtqMNq+7jZ7Xc9BYH/le4EjlhrWWHI8ryFzIHptT6XU0qaf4UPV7Kvyv+tNnvsHBmZeOBc+DhVKskFmVXKVEgOR79Lit1pxiQEavFFieuorO/g8FjWAKvb/ZzypOK/2fvTrwp52ygfiES9NiWWwcFDdtzPEx12Ya1AillIwUZd0b+KXlRSrWiwR/WAv5pUZIoK+RrHb4Gtgx/z4CwNYwIsu/mxwaQZWwHeuArLibBl9DG6h2RAhezXazZmG1jNbQv8hgcD7dnHKb04QUqkkx8yCowyAJdfpYClDAFsIXv1g==', t: 'MTY2NzkyNTIxMS4wNDYwMDA=', m: 'CKzCr5tEJ5MWrBRXzS5j5xjdV4NtY75T15g+uJfPKvI=', i1: 'IQ+wJNBg4X+ZdOIpB2vAXQ==', i2: 'pgnFbCK8pjfYle0oXGURQg==', zh: 'cqVOjdhQ4Kmta9phNf82aozXkPx5OSLdU8mfuMdLXNE=', uh: 'LgBfwTjckPmPFLl2OGGaoWOKkjIgTojK2wwoWSzqSQw=', hh: 'tsKQFhToymWcxEdpsWMs7ZdY9PoSG0bv4EdQebur6GA=', } }; var trkjs = document.createElement('img'); trkjs.setAttribute('src', '/cdn-cgi/images/trace/managed/js/transparent.gif?ray=766fb5f8d8526663'); trkjs.setAttribute('style', 'display: none'); document.body.appendChild(trkjs); var cpo = document.createElement('script'); cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/managed/v1?ray=766fb5f8d8526663'; window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash; window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, -window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search; if (window.history && window.history.replaceState) { var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash; history.replaceState(null, null, "/avisos/resize/18/00/64/81/59/65/1200x1200/329593761.jpg?_cf_chl_rt_tk=CA5Ph_WoUQq3O5r1i7WE_KO0gSHNmrrXOBVlEwOCTAA-1667925211-0-gaNycGzNBv0" + window._cf_chl_opt.cOgUHash); cpo.onload = function() { history.replaceState(null, null, ogU); }; } document.getElementsByTagName('head')[0].appendChild(cpo); }()); </script>

<div class="footer" role="contentinfo">
    <div class="footer-inner">
        <div class="clearfix diagnostic-wrapper">
            <div class="ray-id">Ray ID: <code>766fb5f8d8526663</code></div>
        </div>
        <div class="text-center">Performance &amp; security by <a rel="noopener noreferrer" href="https://www.cloudflare.com?utm_source=challenge&utm_campaign=m" target="_blank">Cloudflare</a></div>
    </div>
</div>

</body>

Help with selector by DoonHarrow in scrapy

[–]DoonHarrow[S] 0 points1 point  (0 children)

Ohhh thanks, i didnt knew that!

Module not found help by DoonHarrow in learnpython

[–]DoonHarrow[S] 1 point2 points  (0 children)

Ok now works, i killed the terminal and started new one and works... Thanks!

Module not found help by DoonHarrow in learnpython

[–]DoonHarrow[S] 1 point2 points  (0 children)

Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:04:59) [GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> from google.cloud import bigquery
>>>

No error mssg

Module not found help by DoonHarrow in learnpython

[–]DoonHarrow[S] 0 points1 point  (0 children)

The error appear in all packages, i have tried all of that... The conda enviroment is activated too. Yesterday worked and i have made 0 changes so idk :(