-
Notifications
You must be signed in to change notification settings - Fork 26
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
EventBrite Changed Something #3
Comments
Hi, So it doesn't currently have a drop down menu like the picture, but it is a multi ticket event. I forget the second URL I tried. I will look to add to this list when I get home and can try some others. I did also try the old version from before the update a week ago--with a 1 instead of 10001--to no avail, fwiw. EDIT: https://www.eventbrite.com/e/space-trace-bottle-release-tickets-28120857241 It's not working on the URL below. This page doesn't have the single header picture like the others, but seems to have an integrated design into the page. It's also missing the "Details" button, with "no ticket information" listed under the Ticket Info section. This makes me hesitant to believe they've uploaded the ticket info to Eventbrite. I may be searching for info that isn't out there yet. I'll continue to try periodically--especially once some info populates under Ticket Info--and let you know of the test results. Edit #2: I tried it on an old event from the same Seller (with the page format identical to the new sale) and it errored. This seems to be the known issue you've added to the README. |
I would love to dig into this if someone could provide some links to events that the script doesnt work for. |
@jmiazga havign trouble getting the info to work on this page https://www.eventbrite.co.uk/e/steelcon-2018-tickets-36060297320#tickets getting error in firefox developer: /* EDIT: I believe Date.prototype.toLocaleFormat is deprecated https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_toLocaleFormat |
@HellboundTKR yeah thanks for reporting this. fef96e1 - should be fixed now |
Tried running ticket-info.js (10/20 update) and it errored out. Instructions were to let you know. 👍
Full code below with error message. Getting message on multiple pages (not isolated to one page). Had success as recent as two weeks ago.
ticket-info.js
function checkLocation() {
if (location.href.indexOf("eventbrite") == -1) {
console.log("You must go to the Eventbrite event page and run the script from there!");
throw new Error("You must go to the Eventbrite event page and run the script from there!");
}
}
var EVENTBRITE_CHANGED_ERROR = "Eventbrite changed something and broke my script. Please let me know.";
function findCollection(data) {
var pattern = /collection[\s:]+[{.*/g;
var res = data.match(pattern);
if(res == null || res.length == 0) {
console.log("Ticket information is not available at this time. Finding alternative info...");
return null;
}
var collectionText = '{' + res[0].replace("collection", '"collection"') + '}';
collectionText = collectionText.replace(/\t/g, '');
}
function findModel(data) {
var pattern = /model[\s:]+{.*},/g;
var res = data.match(pattern);
if(res == null || res.length == 0) {
console.log(EVENTBRITE_CHANGED_ERROR);
throw new Error(EVENTBRITE_CHANGED_ERROR);
}
var modelText = '{' + res[0].replace("model", '"model"').replace(/\t/g, '');
modelText = modelText.substr(0, modelText.lastIndexOf(",")) + '}';
}
function parseInteresting(collectionItem) {
return {
"name": collectionItem.name,
"quantity": {
"quantity_total": collectionItem.quantity_total,
"quantity_sold": collectionItem.quantity_sold,
"quantity_remaining": collectionItem.quantity_remaining
},
"cost": collectionItem.is_free ? "Free" :
(collectionItem.total_cost == null ? collectionItem.ticket_price : collectionItem.total_cost.display),
"status": {
"status_is_sold_out": collectionItem.status_is_sold_out,
"status_is_ended": collectionItem.status_is_ended,
"on_sale_status": collectionItem.on_sale_status
},
"dates": {
"sales_start": new Date(collectionItem.start_sales).toLocaleFormat(),
"sales_end": new Date(collectionItem.end_sales).toLocaleFormat()
}
};
}
function parseModelItems(model) {
return {
"is_free": model.is_free,
"capacity": model.capacity,
"remaining_tickets": model.remaining_tickets,
"status": {
"status_is_sold_out": model.status_is_sold_out,
"status_is_ended": model.status_is_ended
},
"dates": {
"sales_start": model.first_ticket_sales_start_date,
"notification_text": model.not_yet_started_notification_text
},
"most_recent_event_update": new Date(model.changed).toLocaleFormat()
};
}
function createResultTooltip(data) {
var id = "tooltip-custom-event-info";
var tooltip = document.getElementById(id);
if(tooltip != null) {
// Destroy previous
document.body.removeChild(tooltip);
}
}
function run() {
checkLocation();
var markup = document.documentElement.innerHTML;
var collection = findCollection(markup);
var resultString = null;
}
run();
/*
Exception: Error: Eventbrite changed something and broke my script. Please let me know.
findModel@Scratchpad/1:35:9
run@Scratchpad/1:127:15
@Scratchpad/1:151:1
*/
The text was updated successfully, but these errors were encountered: