Home > javascript > How to get link from onclick event using Scrapy?

How to get link from onclick event using Scrapy?

January 9Hits:4
Advertisement

I've been using Scrapy for getting content but I am having some trouble getting links from this particular site:Taleo Site

Clicking the title takes you to the job description. But the href is set to '#'.

And the onclick event is:

onclick="javascript:setEvent(event);requisition_openRequisitionDescription('requisitionListInterface','actOpenRequisitionDescription',_ftl_api.lstVal('requisitionListInterface', 'requisitionListInterface.listRequisition', 'requisitionListInterface.ID1380', this),_ftl_api.intVal('requisitionListInterface', 'requisitionListInterface.ID1384', this));return ftlUtil_followLink(this); 

Also the link for all job descriptions is the same for all jobs. All of the description links are:

https://cantire.taleo.net/careersection/2/jobdetail.ftl

I've been using scrapy for a while and would like to following the link and scrape the content. I'm just having trouble with this sort of setup where the href attribute is '#' and the link is created by JavaScript.

In the past I would do the following to get links and follow them, but in this case this doesn't work.

item['link'] = sel.xpath([email protected]').extract()[0] 

How can I fix this? Thanks

Related Articles

  • How to get link from onclick event using Scrapy?January 9

    I've been using Scrapy for getting content but I am having some trouble getting links from this particular site:Taleo Site Clicking the title takes you to the job description. But the href is set to '#'. And the onclick event is: onclick="javascript:

  • Adding "onclick" event to links in text areas July 17

    I need some help getting and "onclick" event onto some links in a couple drupal pages. I've got 2 pages, each with a text entry field set to "full HTML", within which I've added my a tags. the links work great in this format, however w

  • How to link aspx to the Code behind and set OnClick eventFebruary 10

    I'm working on a login and I want a button inside this login to have a link and when the user clicks on the link it goes to that website. Here is my code in aspx: <asp:login ID="seamenLogin" runat="server" TitleText="<strong

  • have a jquery onclick event show the link in the statusbar on mouse overJanuary 19

    Here's the situation: A basic onclick event in jQuery which is bound to a div. Looks like this: $('#permabox').bind("click", function(){ var permalink = _functionWhichGetsPermalink(); window.location.assign(permalink); }); It works, but if the u

  • Is it better to put the action in the href or in an onclick event?March 5

    From usability point of view: In most of website we can see a link which do an action such as "Delete" link which deletes a record for example, "Add Comment", "Vote Up", .... Is it better to put the javascript action in the h

  • onclick() event not working

    onclick() event not workingSeptember 29

    My original post is here: http://stackoverflow.com/questions/26090790/input-type-file-click-doesnt-work-on-ie8-9?noredirect=1#comment40885240_26090790 . Originally, I was using $j('#file').click() in my event handler for $j('#file-wrapper').on('click

  • Update SharePoint 2010 List with onclick eventNovember 3

    I have a SharePoint list of devices, the columns are as follow, text and choice. The choice is either In or Out. I wanted to have a webpage that the controller of these devices could click on a slider button that either marks them In or Out that in t

  • Google Analytics Goal with Radio Selection and Onclick Event

    Google Analytics Goal with Radio Selection and Onclick EventOctober 9

    I'm trying to create a goal in Google Analytics that tracks the type of account being created in our system. Unfortunately, the URLs aren't definitive to the type of account creation, and the only elements I have are a button and a radio selection. I

  • How to handle two onclick events that not both are fired?December 22

    I make a web application with ArcGIS API for Javascript (version 3.15) to access a geoprocessing service. The service is executed on an onclick event by the user, because the clicked position is used as an input parameter: map.on("click", startG

  • Converting inline Javascript to an onclick eventJanuary 15

    I'll be blunt. Most of my skill is in pure HTML and CSS. I'm trying more and more to expand into JavaScript and JQuery and have some experience, enough to understand many simple tutorials and implement them with my own changes, but not enough to do m

  • PHP plugin - GA onclick event not triggeringJanuary 25

    Got a problem with some PHP code which adds an onclick event to some extearnal links on my site. The first line works correctly and triggers an event in GA when the website link is clicked. However the second line does not trigger an event when the p

  • Why is the onclick event still going to url even after pressing cancel?February 1

    I have a link which has a onclick function <a onclick="return confirm('Are you sure you want to delete this item?');" href="#" data-bind="ifnot: ($data.borrowed_amount > 0 || $data.status == 0), click: $root.deleteMoneyBorro

  • Tracking Google Adwords conversion by class name instead of onclick eventFebruary 7

    I would like to track clicks on my links with Google Adwords Conversion. But I have no chance to insert a onclick event in the link (the CMS don't allows this). But I can insert a class name in the link. Could I use a class name instead combined with

  • Listening to ICommandBar or ICommand OnClick event?April 5

    I have an ArcMap extension and I'm listening to the IEditEvents. When the OnChangeFeature, OnCreateFeature or OnDeleteFeature event is called, I want to know if it came from the "merge(Editor_Merge)" button. Is there a way I can listen to the on

  • Creating Rectangle-based buttons with OnClick eventsJanuary 1

    As the title implies, I want a Button class with an OnClick event handler. It should fire off connected events when it is clicked. This is as far as I've made it: public class Button { public event EventHandler OnClick; public Rectangle Rec { get; se

  • ESRI JS API - don't trigger onClick event when panning MapApril 8

    I have a custom onClick handler for my map that is meant to add a point wherever the map is clicked. I'm finding that this function is triggered even when I click the map to pan. Is it possible to somehow ignore the onClick event if the map is pannin

  • Adding List Item from Visual Web Part in onClick eventJune 3

    enter code hereI'm really new in SP World. I have developed 2 Visual Web Parts which has few TextBox and a Button. What I want to do is onClick event to check if the Values in Text Box fields are ok(format is ok and make sure values of certain TextBo

  • How to define an OnClick event handler for a button from within Qt Creator?August 4

    In visual studio, when designing a windows form, I can easily add an OnClick event handler for a button by double clicking on it. Is it possible to do the same in QtCreator? How should I handle the Click event of a button? Is manually writing the req

  • arc gis javascript API Capturing polygon "onclick" event data to pass as featuresetSeptember 12

    How can you figure out what polygon is clicked within a feature layer? I have a feature layer made of county polygons. When the layer is clicked I want to trigger a geoprocessing task on my server. One of the inputs to the task is a polygon. I can't

  • Calling apex:actionFunction on apex:commandButton's onclick eventMarch 5

    Can we call apex:actionFunction on apex:commandButton's onclick event? Actually i am trying to do this but controller's method is not being called. i am doing something like below - <apex:commandButton title="Apply and Continue" value="A

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.647 s.